<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=NXM_Help_COMMANDS</id>
	<title>NXM Help COMMANDS - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=NXM_Help_COMMANDS"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=NXM_Help_COMMANDS&amp;action=history"/>
	<updated>2026-06-04T20:26:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=NXM_Help_COMMANDS&amp;diff=576&amp;oldid=prev</id>
		<title>ConvertBot: Created page with &quot;&lt;div style=&quot;background-color: #eef9ff; border: 1px solid #999; padding: 10px;&quot;&gt;&amp;uarr; ''Go to the full list of NXM Help pages''.&lt;/div&gt; &lt;onlyinclude&gt; Installing, f...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=NXM_Help_COMMANDS&amp;diff=576&amp;oldid=prev"/>
		<updated>2020-04-27T18:39:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;div style=&amp;quot;background-color: #eef9ff; border: 1px solid #999; padding: 10px;&amp;quot;&amp;gt;&lt;a href=&quot;/NXM_Help&quot; title=&quot;NXM Help&quot;&gt;↑ &amp;#039;&amp;#039;Go to the full list of NXM Help pages&amp;#039;&amp;#039;&lt;/a&gt;.&amp;lt;/div&amp;gt; &amp;lt;onlyinclude&amp;gt; Installing, f...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div style=&amp;quot;background-color: #eef9ff; border: 1px solid #999; padding: 10px;&amp;quot;&amp;gt;[[NXM_Help|&amp;amp;uarr; ''Go to the full list of NXM Help pages'']].&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
Installing, finding and running commands.&lt;br /&gt;
&lt;br /&gt;
There are a number of types of commands which may be run from the NextMidas shell:&lt;br /&gt;
&lt;br /&gt;
# Command Line Processing&lt;br /&gt;
# Primitives, Intrinsics, Macros&lt;br /&gt;
# User Macros&lt;br /&gt;
# Operating System Commands&lt;br /&gt;
&lt;br /&gt;
Commands are CASE-INSENSITIVE and may be abbreviated depending on how they are entered&lt;br /&gt;
in the configuration file.&lt;br /&gt;
&lt;br /&gt;
=== CommandLine - Covers command line syntax and processing.&amp;lt;span id=&amp;quot;CommandLine&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
 Command line parameters and switches are specified using a key=value syntax.&lt;br /&gt;
 If the key= is omitted, the key is obtained from the command dictionary by&lt;br /&gt;
 its positionally dependent (PD) index.  Only PD args are counted when&lt;br /&gt;
 determining the PD index. Key=value or /key=value entries are ignored.&lt;br /&gt;
 See the examples below.&lt;br /&gt;
&lt;br /&gt;
 Switches are normally placed directly after the command name before the&lt;br /&gt;
 1st delimiter.  They may also appear in a parameter slot but do not affect&lt;br /&gt;
 the PD index mapping.  Switches are specified by preceding the name with&lt;br /&gt;
 a &amp;quot;/&amp;quot; and must be fully specified. Parameter names, if configured in the&lt;br /&gt;
 dictionary entry, may be abbreviated.&lt;br /&gt;
&lt;br /&gt;
 The PLOT command, for example, has the command dictionary entry:&lt;br /&gt;
 PLOT,P,8,FILE,SM=LINEAR,CM=MAG,LINE=SOLID,X1,X2,Y1,Y2&lt;br /&gt;
 The command line:&lt;br /&gt;
 PLOT/id=psdplot/tl=1k input y1=-100 /name=&amp;quot;My Plot&amp;quot; y2=200 /bg&lt;br /&gt;
 creates an arguments Table with the values:&lt;br /&gt;
&lt;br /&gt;
 /ID=PSDPLOT&lt;br /&gt;
 /TL=3&lt;br /&gt;
 /NAME=My Plot&lt;br /&gt;
 FILE=INPUT&lt;br /&gt;
 SM=LINEAR&lt;br /&gt;
 CM=MAG&lt;br /&gt;
 LINE=SOLID&lt;br /&gt;
 X1=&lt;br /&gt;
 X2=&lt;br /&gt;
 Y1=-100&lt;br /&gt;
 Y2=200&lt;br /&gt;
 /BG=1&lt;br /&gt;
&lt;br /&gt;
 To access the arguments from inside a command:&lt;br /&gt;
&lt;br /&gt;
 filename = MA.getS(&amp;quot;FILE&amp;quot;);&lt;br /&gt;
 tl = MA.getL(&amp;quot;/TL&amp;quot;);    or  tl = MA.getL(&amp;quot;/TL&amp;quot;,-1);&lt;br /&gt;
 ymin = MA.getD(&amp;quot;Y1&amp;quot;);   or  ymin = MA.getD(&amp;quot;Y1&amp;quot;,0.0);&lt;br /&gt;
&lt;br /&gt;
 Note that state switches (no =value) must appear directly after the command name&lt;br /&gt;
 or at the end of all parameters.  If a state switch appears in a parameter list,&lt;br /&gt;
 it is treated as the &amp;quot;value of&amp;quot; that positionally dependent parameter.  This allows&lt;br /&gt;
 a more natural syntax for branching on switches applied to a macro from within&lt;br /&gt;
 the macro.  For instance, if the SD360 macro is run with the /CLIENT switch, a&lt;br /&gt;
 branch within the macro can be written as:&lt;br /&gt;
&lt;br /&gt;
 if /CLIENT gt 0&lt;br /&gt;
 ! do this&lt;br /&gt;
 endif&lt;br /&gt;
&lt;br /&gt;
 To force the shell to treat an entry starting with a / from being treated as a switch&lt;br /&gt;
 anywhere in the parameter list, escape it with another /.  For instance, to write the&lt;br /&gt;
 above branch without the &amp;quot;gt 0&amp;quot; so the test defaults to &amp;gt; 0, the /CLIENT parameter must&lt;br /&gt;
 be escaped to prevent it from being treated as a trailing switch.&lt;br /&gt;
&lt;br /&gt;
 if //CLIENT&lt;br /&gt;
 ! do this&lt;br /&gt;
 endif&lt;br /&gt;
&lt;br /&gt;
 For performance reasons, command lines are parsed only once when a macro is loaded.&lt;br /&gt;
 To allow runtime command line manipulation, carets are evaluated when a parameter is&lt;br /&gt;
 retrieved.  This helps macros execute fast while still giving some level of macro&lt;br /&gt;
 parameter manipulation at runtime.  The down side is that multiple arguments or switches&lt;br /&gt;
 cannot be stored in a caret'ed results parameter and parsed as one can from X-Midas.&lt;br /&gt;
 The /args=myargs switch can be used to generate a runtime-dependent list of parameters&lt;br /&gt;
 for a command in a macro.  The switch should point to a table in the results table&lt;br /&gt;
 that has entries to be added to the currently parsed list.  For instance,&lt;br /&gt;
&lt;br /&gt;
 if /client gt 0&lt;br /&gt;
 set myargs.x1 100&lt;br /&gt;
 set myargs.x2 200&lt;br /&gt;
 else&lt;br /&gt;
 set myargs.y1 100&lt;br /&gt;
 set myargs.y2 200&lt;br /&gt;
 endif&lt;br /&gt;
 plot myfile /args=myargs&lt;br /&gt;
&lt;br /&gt;
=== Configuration - Adding and finding commands in an option tree.&amp;lt;span id=&amp;quot;Configuration&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
Adding and finding commands in an option tree.&lt;br /&gt;
&lt;br /&gt;
 The following commands may be used to configure and list commands.&lt;br /&gt;
 UPDATE - to configure a command in an option tree&lt;br /&gt;
 MENU - to display a list of commands in an option tree&lt;br /&gt;
&lt;br /&gt;
=== Recall - Recalling and completing commands.&amp;lt;span id=&amp;quot;Recall&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Commands may be recalled by using the bang (!) symbol.  For example, the command&lt;br /&gt;
 nm&amp;gt; status myfile&lt;br /&gt;
may be rerun with a partial command (followed by a  carriage return).&lt;br /&gt;
 nM&amp;gt; !stat&amp;lt;CR&amp;gt;&lt;br /&gt;
 nM&amp;gt; status myfile&lt;br /&gt;
&lt;br /&gt;
=== Completion - Completing commands.&amp;lt;span id=&amp;quot;Completion&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Commands may be completed by following the command name with a question mark (?).&lt;br /&gt;
For example,&lt;br /&gt;
 nM&amp;gt; status ?&lt;br /&gt;
 followed by a carriage return gives the prompt:&lt;br /&gt;
&lt;br /&gt;
 FILE=&lt;br /&gt;
&lt;br /&gt;
and if the user enters 'myfile' followed by a carriage return, &amp;lt;CR&amp;gt; ,the command is&lt;br /&gt;
completed as follows.&lt;br /&gt;
 nM&amp;gt; STATUS,FILE=myfile&lt;br /&gt;
&lt;br /&gt;
=== Intrinsics - shell control and other immediate commands&amp;lt;span id=&amp;quot;Intrinsics&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
=== Primitives - data handling and processing commands&amp;lt;span id=&amp;quot;Primitives&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
=== Macros - the NeXtMidas scripting language commands&amp;lt;span id=&amp;quot;Macros&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
=== UserMacros - Creating and Running user macros.&amp;lt;span id=&amp;quot;UserMacros&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
Creating and Running user macros.&lt;br /&gt;
&lt;br /&gt;
 User macros (or &amp;quot;%&amp;quot; macros) are typically created as a prototype before the developer&lt;br /&gt;
 has determined what the &amp;quot;signature&amp;quot; of the macro will be.  User macros are not required&lt;br /&gt;
 to be &amp;quot;installed&amp;quot;.  That is, they do not have to be in the command dictionary.  Any&lt;br /&gt;
 macro in the HOMEPATH area (see the HOMEPATH command) may be run with a prefix in front&lt;br /&gt;
 of the macro name.  For example,&lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; homepath&lt;br /&gt;
 HomePath = /home/midas/nxm160/nextmidas/nxm/sys/mcr/&lt;br /&gt;
&lt;br /&gt;
 shows the home path is the MCR area of the SYS option tree.  This means the demo&lt;br /&gt;
 command may be run in one of two ways:&lt;br /&gt;
 nM&amp;gt; demo&lt;br /&gt;
 OR&lt;br /&gt;
 nM&amp;gt; %demo&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== OS - Executing Operating System  commands&amp;lt;span id=&amp;quot;OS&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
 How to run Operating System commands.&lt;br /&gt;
&lt;br /&gt;
 OS commands may be run in one of three ways:&lt;br /&gt;
# Internally&lt;br /&gt;
#: nM&amp;gt; $os_command&lt;br /&gt;
# Externally&lt;br /&gt;
#: nM&amp;gt; $$os_command&lt;br /&gt;
# Externally (Configured) - &amp;lt;os_command&amp;gt; MUST BE configured in an option&lt;br /&gt;
#: tree with O-Support&lt;br /&gt;
#: nM&amp;gt; os_command&lt;br /&gt;
&lt;br /&gt;
=== Switches - See Users's Guide -&amp;gt; System Operations -&amp;gt; Switches&amp;lt;span id=&amp;quot;Switches&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
 See the NeXtMidas Users's Guide -&amp;gt; System Operations -&amp;gt; Switches section&lt;br /&gt;
 for information on switches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
[[Category:NXM_Help]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>