Comments
A comment in an EGL file is created in either of the following ways:
- Double right slashes (//) indicate that the subsequent characters are a comment, up to and including the end-of-line character
- A single or multiline comment is delimited by a right slash and asterisk at the start (/*) and by an asterisk and right slash at the end (*/); this form of comment is valid anywhere that a white-space character is valid
You may place a comment inside or outside of an executable statement, as in this example:
/* the assignment e = f occurs if a = b or if c = d */ if (a = b // one comparison || /* OR; another comparison */ c = d) e = f; endEGL does not support embedded comments, so the following entries cause an error:
/* this line starts a comment /* and this line ends the comment, */ but this line is not inside a comment at all */The comment in the first two lines includes a second comment delimiter (/*). An error results only when EGL tries to interpret the third line as source code.
The following is valid:
a = b; /* this line starts a comment // and this line ends the comment */The double right slashes (//) in the last example are themselves part of a larger comment.
Between the symbols #sql{ and }, the EGL comments described earlier are not valid. The following statements apply:
- An SQL comment begins with a double hyphen (--) at the beginning of a line or after white space and continues until the end of the line
- Comments are not available inside a string literal. A series of characters in that literal is interpreted as text even in these contexts:
- A prepare statement
- The defaultSelectCondition property of a record of type SQLRecord
Related concepts
EGL projects, packages, and files
Related reference
EGL source format
EGL statements