.he 'MACRO''Page %'
.fo 'Steven Hardy''January 78'
MACRO
.br
-----
.br
In addition to its uses in a VARS declaration (explained
below), this word precedes a macro definition.  It must be
followed by the name of the macro, a semi-colon and then a  function
body.  For example:
 	: MACRO SWAP;
 	:	VARS X, Y;
 	:	ITEMREAD() -> X;
 	:	ITEMREAD() -> Y;
 	:	X,",",Y,"->",X,"->",Y
 	: END;
.br
The name of the macro (in this case SWAP) is specially marked
(see IDENTPROPS in SYSVARS) as a macro rather than an ordinary
function.  When the compiler reads the name of a macro it
.ul
immediately
calls the function.  This function may read things from the input
stream (perhaps using ITEMREAD) and the results of the macro call
are inserted into the input stream in place of the macro name and
items read.  Thus:
 	: SWAP A B;
.br
is equivalent to
 	: A, B -> A -> B;
.br
Any POP11 word may be used as a macro name provided it has not already
been declared as an ordinary variable or function name.  Once used as
a macro a word cannot later be used as an ordinary variable unless first
cancelled.
.br
