COMMENTS
COMMENTS should be used as a general rule to identify rationale used in writing a script. If you use a filter, a COMMENT can be used to explain the reason.
COMMENTS can also be used to explain the how a particularly complex series of script works.
COMMENTS might be used to help make a code more user friendly and meet certain standards/conventions. Here are some of the conventions you can use in writing your scripts.
1) When I start a new SCRIPT, the header of the script has two lines of COM************ followed by a brief description, followed by two more COM************* lines. This makes it easy to see where the script(s) started. I will then include the SCRIPT (or scripts) that called the subscript.
COM***********************************
COM***********************************
COM scriptwriter
COM date
COM description
COM parent script (script that called project)
COM Modified date/scriptwriter/reason/purpose
COM***********************************
COM***********************************
2) At the end of a sub script I like to include the lines:
COM**********************
COM SCRIPT AA01 finished returning to parent script AA00 (scripts called by multiple scripts you can't specify which script it is returning to.)
COM**********************
3) When I call a SCRIPT, I will have comments immediately following it:
DO SCRIPT AA01_Load_DATA
COM***********************
COM Returning from AA01_Load_data
COM***********************
This makes it much easier to follow the logic in a project. The log will look like:
DO AA01_LOAD_data
COM*******************
COM*******************
COM (header details)
COM*******************
COM*******************
[Script]
COM*******************
COM Script AA01 finished returning to AA00
COM*******************
(note leave blanks in the project before and after these clusters, this will insert spaces in the code.)
COM*******************
COM Returning from AA01
COM*******************