name(formals): MACRO { token-list } name(): MACRO { token-list }A macro may have formal arguments, which will be replaced by actual arguments at execution time. An empty formals list is denoted by (). Otherwise the formals consist of one or more names, separated by commas. The token-list consists of input tokens (strings, names, numbers, delimiters etc.) and is stored unchanged in the definition.
A macro is executed by one of the statements:
name(actuals); name();Each actual consists of a set of tokens which replaces all occurrences of the corresponding formal name. The actuals are separated by commas. Example:
// macro definitions: SHOWIT(X): MACRO { SHOW, NAME = X; } DOIT(): MACRO { DYNAMIC,LINE=RING,FILE="DYNAMIC.OUT"; } // macro calls: SHOWIT(PI); DOIT();