[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
$x
)
To invoke a macro defined by the Define Macro command, you simply use
$macro-id
. Cogsys saves the current input position
on the macro stack. The macro-body for the macro is executed
until an END_OF_MACRO
character is read, then processing is resumed
from the saved location.
Starting with Cogsys 3.0.9, macros can take arguments. See Define Macro, for details on defining macros and arguments. To call a macro with arguments, simply enclose the arguments in square brackets immediately after the call.
The END_OF_MACRO
character is appended automatically by the Macro
Definition command and users should not normally be concerned about
it. However, if your testlist is giving an unexpected
`MACSTACK_UNDERFLOW' errors, look for accidental insertions of the
END_OF_MACRO
character.
Beause the default macro definition is simply the END_OF_MACRO
character, calling a macro before it is defined does nothing.
$x
$macro-id
$macro-id[arg1...]
$$aPress <return> to continue: #R$$ ... $a |
a
. At the $a
macro call, Cogsys prints
`Press <return> to continue:' and waits for keypress.