A166 User's Guide

Advanced

The macro-definition function associates an identifier with a functional string. The macro can have an associated pattern consisting of parameters and/or delimiters, and it can have local symbols. The syntax for a macro definition is:

%DEFINE (macro_id define_pattern) <[>LOCAL id_list<]> (balanced_text)

The define_pattern is a balanced string the macro processor further analyzes as follows:

define_pattern = { [parm_id] [delimiter_specifier] }

Delimiter_specifier is one of the following:

  • Some string not containing non-literal id-continuation, a logical blank, or the character @
  • @delimiter_id

The macro call must have a call pattern that matches its define pattern. Regardless of the type of delimiter used to define a macro, once it is defined, only delimiters used in the definition can be used in the macro call. For example, macros defined with parentheses and commas require parentheses and commas in the macro call, and macros defined with spaces or any other delimiter require that delimiter when called.

The define pattern can have three kinds of delimiters: literal, blank, and identifier.