Allows you to add explanatory text to code. The comment begins with a double slash (//) and ends at a newline character (\n), a carriage return (\r), or the end of the file.
This example uses a comment to document a procedure modification:
// Procedure written 9/5/87 by CHC // revised 9/27/87 by DG FOR EACH Customer NO-LOCK: DISPLAY Customer.CustNum Customer.Name Customer.Contact Customer.Phone. END. |
To be properly interpreted as the beginning of a single-line comment, the "//" must be preceded by a line break or white space. In the first line of code below, the text between "//" and the end of the line will be interpreted as a comment, but it will not in the second line:
Both multi-line comments and single-line comments can be nested inside a single-line comment.