5. Embedded QUEL for Ada : EQUEL Statement Syntax for Ada : Terminator
 
Share this page                  
Terminator
No statement terminator is required for EQUEL/Ada statements. It is conventional not to use a statement terminator in EQUEL statements, although the Ada statement terminator, the semicolon (;), is allowed at the end of EQUEL statements. The preprocessor ignores it.
For example, the following two statements are equivalent:
## sleep 1
and
## sleep 1;
The terminating semicolon may be convenient when entering code directly from the terminal using the -s flag. For information on using the -s flag to test the syntax of a particular EQUEL statement, see Precompiling, Compiling and Linking an EQUEL Program.
EQUEL statements that are made up of a few other statements, such as a display loop, only allow a semicolon after the last statement. For example:
## display empform            --No semicolon here 
## initialize                 --No semicolon here 
## activate menuitem "Help"   --No semicolon here
## {
##     message "No help yet"; --Semicolon allowed
##     sleep 2;               --Semicolon allowed 
## }
## finalize;                  --Semicolon allowed on last statement
Variable declarations made visible to EQUEL observe the normal Ada declaration syntax. Thus, variable declarations must be terminated in the normal way for Ada, with a semicolon.