Was this helpful?
Coding Requirements for Writing EQUEL Programs
The following sections describe coding requirements for writing EQUEL programs.
Comments Embedded in BASIC Output
Each EQUEL statement generates one comment and a few lines of BASIC code. You may find that the preprocessor translates 50 lines of EQUEL into 200 lines of BASIC. This may result in confusion about line numbers when you are debugging the original source code. To facilitate debugging, each group of BASIC statements associated with a particular statement is preceded by a comment corresponding to the original EQUEL source. (Note that only executable EQUEL statements are preceded by a comment.) Each comment is one line long and informs the reader of the file name, line number, and type of statement in the original source file.
Embedding Statements Inside BASIC If Blocks
The preprocessor never generates line numbers as its own. Therefore, you can enclose EQUEL statements in the then or else clauses of a BASIC if statement without changing program control.
For example:
     if (error = 1%) then
##          message "Error on update"
##          sleep 2
     endif
An EQUEL Statement that Does Not Generate Code
The declare cursor statement does not generate any BASIC code. This statement should not be coded as the only statement in BASIC constructs that does not allow empty statements.
Last modified date: 08/28/2024