Language basics / Syntax features |
For clarity and to simplify program maintenance, it is recommended that you document your code by including comments in your source files.
A source comment is text in the source code to assist human readers, but which BDL ignores.
You can use comment indicators during development to disable instruction temporarily, without removing them from your source code modules.
A source comment can be specified by any of the following:
MAIN -- DISPLAY "This line will be ignored." # DISPLAY "This line will be ignored." { DISPLAY "This line will be ignored." DISPLAY "This line will be ignored." } DISPLAY "Hello, World" END MAIN
Within a quoted string, the compiler interprets comment indicators as literal characters, rather than as comment indicators.
You cannot use braces ( { } ) to nest comments within comments.
Comments cannot appear in the form section defining a layout grid, such as SCREEN, TABLE, TREE, or GRID.
The # symbol cannot indicate comments in an SQL statement block nor in the text of a prepared statement.
You cannot specify consecutive minus signs ( -- ) in arithmetic expressions, as BDL interprets what follows as a comment. Instead, use a blank space or parentheses to separate consecutive arithmetic minus signs.
Do not follow the -- comment indicator with the sharp (#) symbol, unless you intend to compile the same source file with the Informix® 4GL product. The --# specific comment indicator is used to distinguish Informix 4GL code from Genero BDL code. This conditional code compilation technique can be inverted by enclosing code blocks between --#{ and --#} comments:
MAIN --# DISPLAY "Ignored by I4GL, but compiled with BDL." --#{ DISPLAY "Ignored by BDL, but compiled with I4GL." --#} END MAIN