<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?action=history&amp;feed=atom&amp;title=Programmer_Guide%2FCommand_Reference%2FMACRO</id>
	<title>Programmer Guide/Command Reference/MACRO - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?action=history&amp;feed=atom&amp;title=Programmer_Guide%2FCommand_Reference%2FMACRO"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;action=history"/>
	<updated>2026-05-06T23:35:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=6601&amp;oldid=prev</id>
		<title>Christian at 14:58, 25 April 2014</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=6601&amp;oldid=prev"/>
		<updated>2014-04-25T14:58:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:58, 25 April 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment that is set up as a &amp;#039;&amp;#039;copy&amp;#039;&amp;#039; of the environment of the caller. This means that the subroutine gets a copy of all local variables and is free of modifying them, but that any such modification is local to the subroutine and will get lost after its execution. Hence, your subroutine will never be able to alter (or, damage) the local variables of the caller (for a different behaviour, see below, or directly refer to the {{STX}} statements &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment that is set up as a &amp;#039;&amp;#039;copy&amp;#039;&amp;#039; of the environment of the caller. This means that the subroutine gets a copy of all local variables and is free of modifying them, but that any such modification is local to the subroutine and will get lost after its execution. Hence, your subroutine will never be able to alter (or, damage) the local variables of the caller (for a different behaviour, see below, or directly refer to the {{STX}} statements &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The sourc file containing the macro &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The sourc file containing the macro &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] or [[Programmer_Guide/STx_Guru|Becoming an S_TOOLS-STx Guru (in 240.918 simple steps)&lt;/ins&gt;]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Christian</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=6600&amp;oldid=prev</id>
		<title>Christian at 14:57, 25 April 2014</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=6600&amp;oldid=prev"/>
		<updated>2014-04-25T14:57:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:57, 25 April 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to &lt;/del&gt;it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment that is set up as a &#039;&#039;copy&#039;&#039; of the environment of the caller. This means that the subroutine gets a copy of all local variables and is free of modifying them, but that any such modification is local to the subroutine and will get lost after its execution. Hence, your subroutine will never be able to alter (or, damage) the local variables of the caller (for a different behaviour, see below, or directly refer to the {{STX}} statements &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment that is set up as a &#039;&#039;copy&#039;&#039; of the environment of the caller. This means that the subroutine gets a copy of all local variables and is free of modifying them, but that any such modification is local to the subroutine and will get lost after its execution. Hence, your subroutine will never be able to alter (or, damage) the local variables of the caller (for a different behaviour, see below, or directly refer to the {{STX}} statements &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The sourc file containing the macro &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The sourc file containing the macro &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Christian</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=6343&amp;oldid=prev</id>
		<title>193.171.195.53 at 13:01, 15 April 2014</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=6343&amp;oldid=prev"/>
		<updated>2014-04-15T13:01:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:01, 15 April 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;&lt;/ins&gt;macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment that is set up as a &amp;#039;&amp;#039;copy&amp;#039;&amp;#039; of the environment of the caller. This means that the subroutine gets a copy of all local variables and is free of modifying them, but that any such modification is local to the subroutine and will get lost after its execution. Hence, your subroutine will never be able to alter (or, damage) the local variables of the caller (for a different behaviour, see below, or directly refer to the {{STX}} statements &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment that is set up as a &amp;#039;&amp;#039;copy&amp;#039;&amp;#039; of the environment of the caller. This means that the subroutine gets a copy of all local variables and is free of modifying them, but that any such modification is local to the subroutine and will get lost after its execution. Hence, your subroutine will never be able to alter (or, damage) the local variables of the caller (for a different behaviour, see below, or directly refer to the {{STX}} statements &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;source code &lt;/del&gt;&amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;sourc file containing the &lt;/ins&gt;macro &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>193.171.195.53</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2948&amp;oldid=prev</id>
		<title>Christian at 16:37, 5 April 2011</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2948&amp;oldid=prev"/>
		<updated>2011-04-05T16:37:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:37, 5 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment that is set up as a &#039;&#039;copy&#039;&#039; of the environment of the caller. This means that the subroutine gets a copy of all local variables and is free of modifying them, but that any such modification is local to the subroutine and will get lost after its execution. Hence, your subroutine will never be able to alter (or, damage) the local variables of the caller (for a different behaviour, see below, or refer to the {{STX}} statements &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment that is set up as a &#039;&#039;copy&#039;&#039; of the environment of the caller. This means that the subroutine gets a copy of all local variables and is free of modifying them, but that any such modification is local to the subroutine and will get lost after its execution. Hence, your subroutine will never be able to alter (or, damage) the local variables of the caller (for a different behaviour, see below, or &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;directly &lt;/ins&gt;refer to the {{STX}} statements &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Christian</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2947&amp;oldid=prev</id>
		<title>Christian at 16:37, 5 April 2011</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2947&amp;oldid=prev"/>
		<updated>2011-04-05T16:37:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:37, 5 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;meaning &lt;/del&gt;that any &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;changes the macro does &lt;/del&gt;to the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;environment &lt;/del&gt;will &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;be &lt;/del&gt;lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro (i.e., the subroutine) specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;that is set up as a &#039;&#039;copy&#039;&#039; of the environment of the caller. This means that the subroutine gets a copy of all local variables and is free of modifying them&lt;/ins&gt;, &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;but &lt;/ins&gt;that any &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;such modification is local &lt;/ins&gt;to the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;subroutine and &lt;/ins&gt;will &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;get &lt;/ins&gt;lost after its execution&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Hence, your subroutine will never be able to alter (or, damage) the local variables of the caller (for a different behaviour, see below, or refer to the {{STX}} statements &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt;)&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Christian</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2945&amp;oldid=prev</id>
		<title>Christian at 16:29, 5 April 2011</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2945&amp;oldid=prev"/>
		<updated>2011-04-05T16:29:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:29, 5 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment, meaning that any changes the macro does to the environment will be lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;(i.e., the subroutine) &lt;/ins&gt;specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment, meaning that any changes the macro does to the environment will be lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. 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}}]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If you want to execute a subroutine in the variable environment of the caller (which is dangerous), you will enjoy the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/MACROX|MACROX]]&amp;lt;/code&amp;gt; command. If, on the other hand, you want to separate the subroutine even more thoroughly from your current environment, you may even have it executed by a separate instance of the {{STX}} shell, i.e. the {{STX}} command interpreter, by using the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/SHELL|SHELL]]&amp;lt;/code&amp;gt; command for executing the subroutine.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Christian</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2941&amp;oldid=prev</id>
		<title>Christian at 16:25, 5 April 2011</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2941&amp;oldid=prev"/>
		<updated>2011-04-05T16:25:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:25, 5 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment, meaning that any changes the macro does to the environment will be lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment, meaning that any changes the macro does to the environment will be lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. For more information on argument passing, and parsing, see [[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;XXX&lt;/del&gt;|Argument Passing]]. For a broader information on macro programming, see [[XXX|Script Programming in {{STX}}]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; command). The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. For more information on argument passing, and parsing, see [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Programmer_Guide/Concepts/Argument_Passing&lt;/ins&gt;|Argument Passing]]. For a broader information on macro programming, see [[XXX|Script Programming in {{STX}}]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Christian</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2940&amp;oldid=prev</id>
		<title>Christian at 16:25, 5 April 2011</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2940&amp;oldid=prev"/>
		<updated>2011-04-05T16:25:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:25, 5 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l4&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment, meaning that any changes the macro does to the environment will be lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment, meaning that any changes the macro does to the environment will be lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt;)The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/ins&gt;&amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt; &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;command&lt;/ins&gt;)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. &lt;/ins&gt;The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;. For &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;more &lt;/ins&gt;information &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;on argument passing, &lt;/ins&gt;and parsing&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, see [[XXX|Argument Passing]]. For a broader information on macro programming, &lt;/ins&gt;see [[XXX|Script Programming in {{STX}}]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For information &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;about macro definitions (header) &lt;/del&gt;and &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;argument &lt;/del&gt;parsing see &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;[[XXX|Script Programming in {{STX}}]]&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Many macros use the call-format: name command arguments (e.g. &amp;lt;code&amp;gt;MSGBOX MSG text&amp;lt;/code&amp;gt;). If you want to pass quoted arguments to such a macro, use the format &amp;lt;code&amp;gt;MSGBOX &#039;MSG text&#039;&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;MSGBOX MSG &#039;text&#039;&amp;lt;/code&amp;gt;. This is necessary because the argument string &amp;lt;code&amp;gt;MSG &#039;text&#039;&amp;lt;/code&amp;gt; is passed (after command-line processing) as &amp;lt;code&amp;gt;MSGtext&amp;lt;/code&amp;gt; to the macro.If a new shell is called to run a macro, the id (8 hex digits) is assigned to the variable &amp;lt;code&amp;gt;#SHELL&amp;lt;/code&amp;gt; of the caller. In the new shell, the variable &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt; is set to &#039;&amp;lt;code&amp;gt;this_shellid caller_shellid&amp;lt;/code&amp;gt;&#039;. The two variables can be used to identify the shells in communication messages.It is not necessary to use the command &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; explicitly, because the interpreter tries to execute all &#039;non-shell&#039; commands as a macro. This means the command line &amp;lt;code&amp;gt;MACRO macroname&amp;lt;/code&amp;gt; is equivalent to command line &amp;lt;code&amp;gt;macroname&amp;lt;/code&amp;gt;&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Christian</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2938&amp;oldid=prev</id>
		<title>Christian at 16:22, 5 April 2011</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2938&amp;oldid=prev"/>
		<updated>2011-04-05T16:22:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:22, 5 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;. Any &lt;/del&gt;changes the macro does to the environment will &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;get &lt;/del&gt;lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the macro specified by &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;, passing to it the arguments specified by &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, meaning that any &lt;/ins&gt;changes the macro does to the environment will &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;be &lt;/ins&gt;lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt;)The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt;)The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For information about macro definitions (header) and argument parsing see the [[XXX|Script Programming in {{STX}}]]. Many macros use the call-format: name command arguments (e.g. &amp;lt;code&amp;gt;MSGBOX MSG text&amp;lt;/code&amp;gt;). If you want to pass quoted arguments to such a macro, use the format &amp;lt;code&amp;gt;MSGBOX &amp;#039;MSG text&amp;#039;&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;MSGBOX MSG &amp;#039;text&amp;#039;&amp;lt;/code&amp;gt;. This is necessary because the argument string &amp;lt;code&amp;gt;MSG &amp;#039;text&amp;#039;&amp;lt;/code&amp;gt; is passed (after command-line processing) as &amp;lt;code&amp;gt;MSGtext&amp;lt;/code&amp;gt; to the macro.If a new shell is called to run a macro, the id (8 hex digits) is assigned to the variable &amp;lt;code&amp;gt;#SHELL&amp;lt;/code&amp;gt; of the caller. In the new shell, the variable &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt; is set to &amp;#039;&amp;lt;code&amp;gt;this_shellid caller_shellid&amp;lt;/code&amp;gt;&amp;#039;. The two variables can be used to identify the shells in communication messages.It is not necessary to use the command &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; explicitly, because the interpreter tries to execute all &amp;#039;non-shell&amp;#039; commands as a macro. This means the command line &amp;lt;code&amp;gt;MACRO macroname&amp;lt;/code&amp;gt; is equivalent to command line &amp;lt;code&amp;gt;macroname&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For information about macro definitions (header) and argument parsing see the [[XXX|Script Programming in {{STX}}]]. Many macros use the call-format: name command arguments (e.g. &amp;lt;code&amp;gt;MSGBOX MSG text&amp;lt;/code&amp;gt;). If you want to pass quoted arguments to such a macro, use the format &amp;lt;code&amp;gt;MSGBOX &amp;#039;MSG text&amp;#039;&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;MSGBOX MSG &amp;#039;text&amp;#039;&amp;lt;/code&amp;gt;. This is necessary because the argument string &amp;lt;code&amp;gt;MSG &amp;#039;text&amp;#039;&amp;lt;/code&amp;gt; is passed (after command-line processing) as &amp;lt;code&amp;gt;MSGtext&amp;lt;/code&amp;gt; to the macro.If a new shell is called to run a macro, the id (8 hex digits) is assigned to the variable &amp;lt;code&amp;gt;#SHELL&amp;lt;/code&amp;gt; of the caller. In the new shell, the variable &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt; is set to &amp;#039;&amp;lt;code&amp;gt;this_shellid caller_shellid&amp;lt;/code&amp;gt;&amp;#039;. The two variables can be used to identify the shells in communication messages.It is not necessary to use the command &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; explicitly, because the interpreter tries to execute all &amp;#039;non-shell&amp;#039; commands as a macro. This means the command line &amp;lt;code&amp;gt;MACRO macroname&amp;lt;/code&amp;gt; is equivalent to command line &amp;lt;code&amp;gt;macroname&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Christian</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2935&amp;oldid=prev</id>
		<title>Christian at 16:19, 5 April 2011</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/MACRO&amp;diff=2935&amp;oldid=prev"/>
		<updated>2011-04-05T16:19:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:19, 5 April 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  MACRO &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Run a &lt;/del&gt;macro &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;with &lt;/del&gt;the arguments &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment. Any changes the macro does to the environment will get lost after its execution&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; command executes the &lt;/ins&gt;macro &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;specified by &lt;/ins&gt;&amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, passing to it &lt;/ins&gt;the arguments &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;specified by &lt;/ins&gt;&amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt;. The macro will be started in its own variable environment. Any changes the macro does to the environment will get lost after its execution.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; MACROX &amp;lt;var&amp;gt;macroname macroarguments&amp;lt;/var&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Run the macro &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; with the arguments &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; using the current variable environment. Any changes the macro does to the environment will persist after its execution. This includes any unwanted changes, so be careful&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt;)The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The macro source code &amp;lt;var&amp;gt;macroname&amp;lt;/var&amp;gt; must be loaded (see &amp;lt;code&amp;gt;[[User Guide/Workspace/Pre-configured profiles|LOAD]]&amp;lt;/code&amp;gt;)The &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; passed to the macro are stored in the variable &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt; 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 &amp;lt;var&amp;gt;macroarguments&amp;lt;/var&amp;gt; before it is assigned to &amp;lt;code&amp;gt;#ARGV&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For information about macro definitions (header) and argument parsing see the [[XXX|Script Programming in {{STX}}]]. Many macros use the call-format: name command arguments (e.g. &amp;lt;code&amp;gt;MSGBOX MSG text&amp;lt;/code&amp;gt;). If you want to pass quoted arguments to such a macro, use the format &amp;lt;code&amp;gt;MSGBOX &amp;#039;MSG text&amp;#039;&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;MSGBOX MSG &amp;#039;text&amp;#039;&amp;lt;/code&amp;gt;. This is necessary because the argument string &amp;lt;code&amp;gt;MSG &amp;#039;text&amp;#039;&amp;lt;/code&amp;gt; is passed (after command-line processing) as &amp;lt;code&amp;gt;MSGtext&amp;lt;/code&amp;gt; to the macro.If a new shell is called to run a macro, the id (8 hex digits) is assigned to the variable &amp;lt;code&amp;gt;#SHELL&amp;lt;/code&amp;gt; of the caller. In the new shell, the variable &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt; is set to &amp;#039;&amp;lt;code&amp;gt;this_shellid caller_shellid&amp;lt;/code&amp;gt;&amp;#039;. The two variables can be used to identify the shells in communication messages.It is not necessary to use the command &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; explicitly, because the interpreter tries to execute all &amp;#039;non-shell&amp;#039; commands as a macro. This means the command line &amp;lt;code&amp;gt;MACRO macroname&amp;lt;/code&amp;gt; is equivalent to command line &amp;lt;code&amp;gt;macroname&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For information about macro definitions (header) and argument parsing see the [[XXX|Script Programming in {{STX}}]]. Many macros use the call-format: name command arguments (e.g. &amp;lt;code&amp;gt;MSGBOX MSG text&amp;lt;/code&amp;gt;). If you want to pass quoted arguments to such a macro, use the format &amp;lt;code&amp;gt;MSGBOX &amp;#039;MSG text&amp;#039;&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;MSGBOX MSG &amp;#039;text&amp;#039;&amp;lt;/code&amp;gt;. This is necessary because the argument string &amp;lt;code&amp;gt;MSG &amp;#039;text&amp;#039;&amp;lt;/code&amp;gt; is passed (after command-line processing) as &amp;lt;code&amp;gt;MSGtext&amp;lt;/code&amp;gt; to the macro.If a new shell is called to run a macro, the id (8 hex digits) is assigned to the variable &amp;lt;code&amp;gt;#SHELL&amp;lt;/code&amp;gt; of the caller. In the new shell, the variable &amp;lt;code&amp;gt;SHELL&amp;lt;/code&amp;gt; is set to &amp;#039;&amp;lt;code&amp;gt;this_shellid caller_shellid&amp;lt;/code&amp;gt;&amp;#039;. The two variables can be used to identify the shells in communication messages.It is not necessary to use the command &amp;lt;code&amp;gt;MACRO&amp;lt;/code&amp;gt; explicitly, because the interpreter tries to execute all &amp;#039;non-shell&amp;#039; commands as a macro. This means the command line &amp;lt;code&amp;gt;MACRO macroname&amp;lt;/code&amp;gt; is equivalent to command line &amp;lt;code&amp;gt;macroname&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Christian</name></author>
	</entry>
</feed>