A comment in an EGL
file is a group of characters that is ignored
in the generation process. You can create comments in either of the
following
ways:
- Double forward slashes (//) indicate that the subsequent
characters are
a comment, up to and including the end-of-line character
- A
multiline comment is delimited by a forward slash and asterisk at
the
start (/*) and by an asterisk and forward slash at the end (*/); this
form
of comment is valid anywhere that a white-space character is valid
You can 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;
end
Because EGL does not support embedded multiline
comments, 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 opening 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 forward
slashes (//) in the last example are themselves part
of a larger comment.
The following considerations apply to comments
in embedded SQL code:
- Between the symbols #sql{ and }, the
EGL comments described earlier are
not valid, because only SQL code belongs in that location.
- 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