Was this helpful?
Comments
You can include a comment field or line in an EQUEL statement by typing the exclamation point (!) at the beginning of the comment field. The following example shows the use of a comment field on the same line as an EQUEL statement.
##     open cursor emp     ! Process employees
The next example shows the use of a comment field embedded in an EQUEL statement:
##     retrieve (namevar=e.ename)
##     ! confirm that "eno" was chosen
##     where e.eno = currentval
In both cases, the preprocessor ignores the comment field. Note that a comment field terminates with the new line. A comment field cannot be continued over multiple lines.
A comment line can appear anywhere in an EQUEL program that a blank line is allowed, with the following exceptions:
In string constants. Such a comment would be interpreted as part of the string constant.
Between two words that are reserved when they appear together, such as declare cursor. See the list of reserved words in the QUEL Reference Guide.
In parts of statements that are dynamically defined. For example, a comment in a string variable specifying a form name is interpreted as part of the form name.
The following restrictions apply to BASIC comments that are not in lines beginning with ##:
BASIC comments cannot appear between component lines of EQUEL block-type statements. These include retrieve, initialize, activate, unloadtable, formdata, and tabledata, all of which at least optionally have accompanying blocks delimited by open and close braces. BASIC comment lines must not appear between the statement and its block-opening delimiter.
For example:
##      retrieve (ename = employee.name)  
          ! Illegal to put a host comment here! 
## {
          ! A host comment is perfectly legal here 
          print "Employee name";ename
## }
BASIC comments cannot appear between the components of compound statements, in particular the display statement. It is illegal for a BASIC comment to appear between any two adjacent components of the display statement, including display itself and its accompanying initialize, activate, and finalize statements.
For example:
## display empform
            ! illegal to put a host comment here! 
## initialize (empname = "frisco mcmullen")
            ! host comment illegal here! 
## activate menuitem "clear"
## {
            ! host comment here is fine 
##               clear field all
## }
            ! host comment illegal here! 
## activate menuitem "end"
## {
##               breakdisplay
## }
            ! host comment illegal here! 
## finalize
The QUEL Reference Guide specifies these restrictions on a statement-by-statement basis.
When the QUEL comment is delimited by /* and */ or appears on lines that begin with ##, it can be considered a valid EQUEL/BASIC comment and can span multiple lines.
Last modified date: 06/10/2024