Multics PL/I

The Multics preprocessor was much more limited than other PL/I preprocessors, more similar to C's preprocessor.

Major features lacking were preprocessor labels, %GOTO, %DO, and preprocessor procedures.

The preprocessor was a standalone program not integhrated with the compiler.

Statements:

%INCLUDE <identifier>;

provides an expansion time include file feature.

%INCLUDE <quoted-string>;

provides an expansion time include file feature.

%abort <char_string>;

allows you to send messages to user_output at macro time and sets

the minimum value of pl1_macro_severity_ to four.

%default <identifier> to <constant-expression>;

is ignored if the identifier has been used in a parameter statement;

otherwise, causes the same substitution behavior as %replace.

%error <char_string>;

allows you to send messages to user_output at macro time and sets

the minimum value of pl1_macro_severity_ to three.

%if <constant-expression> %then <token-string>

where <token-string> is a possibly null string of tokens and the

<constant-expression>'s must evaluate to a bit_string constant.

[%else <token-string>] %endif

where <token-string> is a possibly null string of tokens.

[%elseif <constant-expression> %then <token-string>]...

where <token-string> is a possibly null string of tokens and the

<constant-expression>'s must evaluate to a bit_string constant.

%print <char_string>;

allows you to send messages to user_output at macro time and sets

the minimum value of pl1_macro_severity_ to zero.

%replace <identifier> by <constant-expression>

where <constant-expression> is an expression whose operands are

either constants or identifiers previously defined in other

statements or on the command line.

%set <identifier> to <constant-expression>

is like %replace in the way it deals with replacement activity and

constant expression evaluation, conflicts with parameters, etc.

%warn <char_string>;

allows you to send messages to user_output at macro time and sets

the minimum value of pl1_macro_severity_ to one.

Notes on skip and page macros:

These are features that the pl1 compiler accepts. The macro processor

checks them for syntactic correctness and passes the statement through.

Notes on expansion time include files:

%INCLUDE <identifier>;

%INCLUDE <quoted-string>;

provides an expansion time include file feature. Include files are

found through the translator search rules and have the same naming

conventions as compile time include files. You are permitted a maximum

of 255 include files in one expansion, and you can nest them 64 deep.

This differs from %include in that the macro processor merely checks to

see that the %include statement is syntactically correct and outputs

the statement.

Builtins:

%isarg (<char_string>)

is a macro builtin function that returns a value of data type bit(1).

%isarg (<pl1-token>)

is a macro builtin function that returns a value of data type bit(1).

%isdef (<identifier>)

is a macro builtin function that returns a value of data type bit(1).

%target (<identifier>)

is a replacement identifier of data type bit (1) whose value is

true only if the value of the <identifier> is equal to the value of

the identifier given as the argument of -target on the command

line.

http://web.mit.edu/multics-history/source/Multics/ldd/system_library_tools/source/bound_pl1_macro_.s.archive