Keil Logo

Comment Function

The Comment MPL function allows you to add comments to your macro definitions. MPL is subtle which makes the operation of some macros unobvious. Therefore, it is good programming practice to add comments to your macro definitions. Comment functions always expand to a null string. The syntax of the comment function is:

%'text'

%'text <EOL>

Two terminating characters are recognized for comments: the apostrophe and the end-of-line character (<EOL>). When a comment is terminated with the <EOL>, all text in the comment including the <EOL> is replaced with a null string. This allows you to create several lines of comments without including <EOL> characters in the expanded output.

No matter which form of the comment function you use, comment text is not evaluated for macro calls.

Source Text

MOV    R5, R15    %'the following line will be kept separate'
MOV    R1,        %'this comment eats the newline character
R12
%' This is a Multi-Line comment.
%' This is another line.
%' And, this is a third line.

Output Text

MOV    R5, R15
MOV    R1,        R12
  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.