Michael_Lowry

Comments at the end of script lines

Discussion created by Michael_Lowry on Aug 24, 2017
Latest reply on Aug 25, 2017 by Michael_Lowry

I recently came across an object with comments at the end of script lines. E.g.,

:SET &VAR1# = "ABC123" ! This is a comment.
:PRINT "Variable 1: &VAR1#"

No error occurs when I save this script. It executes without error too.

2017-08-24 15:33:09 - U00020408 Variable 1: ABC123

The documentation indicates that this type of comment is not allowed. Here is the relevant passage from the “Comment Lines” section of the Script Structure documentation page (emphasis mine):

Each line starting with the exclamation mark character "!", is a  comment. These lines are not considered as processing steps and skipped  during script execution...If the exclamation mark character is used within a line, however, this line is not considered a comment.

Are end-of-line comments allowed, or is the documentation in error? If this type of comment is allowed, in which set of circumstances it it permitted?


Outcomes