Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When it comes to commenting code, you must find a balance between too much and too little. Comments are considered documentation that should be modified as a part of regular maintenance or development.

In general, its it is best to assume the reader understands the basics of Lua, so we recommend using comments in three two areas:

Expand
title1) To document the history and ownership of the code

At the top of each module/function, you should provide a “header” comment block to document the history of the code:

Code Block
languagelua
-- ----------------------
-- This module is created to do this and that
--
-- (c) 2012 iNTERFACEWARE Inc.  All rights reserved
--
-- 01 Jan 2012 Bob Smith first iteration
-- 02 Feb 2012 Ian Flemming  Added HL7 Spy information
--
-- ----------------------

...