Use the following guidelines concerning the inclusion of comments in the program code:
Use comments to explain or summarize the intent of the code. Explain complex logic, rather than just repeating it in the comments.
Provide a revision history of changes made. Include the appropriate FIS tracking number.
Single Line Comments
Only include single line comments at the end of a line of code if the line will not extend into the right margin (i.e., off the right side of the screen space). For longer single-line comments, insert the comment prior to the line of code being described.
// Write single line comments using this notation
Avoid multiple single line comments. Generally, a multi-line comment improves readability.
Multi-Line Comments
Enclose multi-line comments in /* */ comment indicators.
/* Multi-line comments should be
written using this notation.
*/
By placing the /* and */ characters on individual lines, the comment block will be distinquished from the rest of the program code. This formatting technique uses the additional whitespace to increase readability.
The PSL compiler accepts comment blocks delimited by /* and */ whenever a PSL statement is valid, except immediately following the opening curly bracket of a statement block.