Because Xtal software is developed collaboratively, some conventions apply to
the layout of program code and the use of ratmac instructions. The layout
conventions are to assist in the distribution and maintenance by providing a
consistent format for the source files. Other constraints exist to promote
'safe practices' in the application of the preprocessor. Here is a list some
simple conventions that must be adhered to.
-
Macro definitions containing more than one statement must be surrounded
by the digraphs $( and $). In macros these should not be put in columns 1 and 2.
-
An ELSE IF statement should not follow a statement containing an
unconditional BREAK, NEXT, or RETURN to avoid the Fortran77 diagnostic "a part
of the program cannot be reached".
-
When $( or $) are used as statement block delimiters, each should be on
its own line in columns 1 and 2. This is the reverse stipulation to macro
definitions.
-
Every active statement line should end with a # after which an
explanatory comment should follow. All pure comment lines should begin with a #
in column 1.
|