Keil Logo


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 shown below:

%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.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.