GIN Macros
A macro definition consists of a series of source records enclosed between the directives #MACRO and #NORMAL. It may contain anything except the directives #GO, #MACRO, #USE and #READ. Each macro has a name, consisting of a letter followed by 0 to 7 alphanumeric characters. A macro name must be unique, and its first four characters must be different from the first four characters of any instruction mnemonic.
At any point in a macro definition a formal parameter may be included. A formal parameter consists of the character % followed by a letter. (It is not possible to use % for any other purpose within a macro definition). When the macro is called, %A will be replaced by the first actual parameter in the call line, %B by the second, and so on.
The absence of restrictions on what may appear on a line allows directives, macro calls, labels, or even erroneous lines to be stored. Storing erroneous lines can be useful for parameter validation. Suppose for example that %B is expected to be an expression whose value does not exceed that of identifier AMAX: then the following coding would cause the parameter to be checked:
#SKI %B>AMAX&AMAX ! PARAMETER OUT OF RANGE: %B #SKI %B>AMAX&AMAX<1&1 ( body of macro )