Programmer Guide/Command Reference/MACROX: Difference between revisions
(Created page with '{{DISPLAYTITLE:{{SUBPAGENAME}}}} MACROX <var>macroname macroarguments</var> The <code>MACROX</code> command executes the macro <var>macroname</var> ''in the current variable en…') |
No edit summary |
||
Line 4: | Line 4: | ||
The <code>MACROX</code> command executes the macro <var>macroname</var> ''in the current variable environment'', passing it the arguments specified by <var>macroarguments</var>. Any changes the macro does to the environment will persist after its execution. This includes any unwanted changes, so be careful. | The <code>MACROX</code> command executes the macro <var>macroname</var> ''in the current variable environment'', passing it the arguments specified by <var>macroarguments</var>. Any changes the macro does to the environment will persist after its execution. This includes any unwanted changes, so be careful. | ||
The macro source code <var>macroname</var> must be loaded (see <code>[[User Guide/Workspace/Pre-configured profiles|LOAD]]</code>)The <var>macroarguments</var> passed to the macro are stored in the variable <code>#ARGV</code> of the called macro. Because of the special command-line processing in {{STX}}, all string replacements are applied to and all special parsing information (e.g. quotation marks) are removed from <var>macroarguments</var> before it is assigned to <code>#ARGV</code>. | The macro source code <var>macroname</var> must be loaded (see the <code>[[User Guide/Workspace/Pre-configured profiles|LOAD]]</code> command). The <var>macroarguments</var> passed to the macro are stored in the variable <code>#ARGV</code> of the called macro. Because of the special command-line processing in {{STX}}, all string replacements are applied to and all special parsing information (e.g. quotation marks) are removed from <var>macroarguments</var> before it is assigned to <code>#ARGV</code>. For more information on argument passing, and parsing, see [[Programmer_Guide/Concepts/Argument_Passing|Argument Passing]]. For a broader information on macro programming, see [[XXX|Script Programming in {{STX}}]]. | ||
For information |
Revision as of 17:26, 5 April 2011
MACROX macroname macroarguments
The MACROX
command executes the macro macroname in the current variable environment, passing it the arguments specified by macroarguments. Any changes the macro does to the environment will persist after its execution. This includes any unwanted changes, so be careful.
The macro source code macroname must be loaded (see the LOAD
command). The macroarguments passed to the macro are stored in the variable #ARGV
of the called macro. Because of the special command-line processing in STx, all string replacements are applied to and all special parsing information (e.g. quotation marks) are removed from macroarguments before it is assigned to #ARGV
. For more information on argument passing, and parsing, see Argument Passing. For a broader information on macro programming, see Script Programming in STx.