<?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_RESULTS</id>
	<title>NXM Help RESULTS - 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_RESULTS"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=NXM_Help_RESULTS&amp;action=history"/>
	<updated>2026-06-13T08:34:09Z</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_RESULTS&amp;diff=586&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; === RESULTS -...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=NXM_Help_RESULTS&amp;diff=586&amp;oldid=prev"/>
		<updated>2020-04-27T18:39:28Z</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; === RESULTS -...&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;
=== RESULTS - Results table for working variables&amp;lt;span id=&amp;quot;RESULTS&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
If you are familiar with other version of Midas, such as X-Midas, the results&lt;br /&gt;
parameters of NeXtMidas will have a few surprises.  The results table can hold&lt;br /&gt;
ANY object, including tables of other objects.  These objects can be queried&lt;br /&gt;
for internal information or controlled via its set methods.  The results table&lt;br /&gt;
serves an a near transparent interface between the macro language and the&lt;br /&gt;
macro's component primitives.&lt;br /&gt;
&lt;br /&gt;
=== SCOPE - global and local scope within the macro language&amp;lt;span id=&amp;quot;SCOPE&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
=== ATOMIC - Atomic results are results parameters with more than one numeric element.&amp;lt;span id=&amp;quot;ATOMIC&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
Atomic results are results parameters with more than one numeric element.&lt;br /&gt;
All Midas files have atomic formats such as SF, VD, or CF.  The results&lt;br /&gt;
table can be used to store any atomic format that is supported by the file&lt;br /&gt;
system along with any arbitrarily sized array of scalars.  For example:&lt;br /&gt;
&lt;br /&gt;
 res myres  myfile(201)&lt;br /&gt;
&lt;br /&gt;
will create a 3 element results parameter of type D because myfile contains &lt;br /&gt;
elements of the VD atomic format, such as a position in space vector.  The &lt;br /&gt;
shell also supports the (X,Y,Z,..) syntax for specifying an atomic result.  &lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 res myres (0.5,3.3)&lt;br /&gt;
&lt;br /&gt;
creates a result of type CD or complex double, or:&lt;br /&gt;
&lt;br /&gt;
 res myres (1,2,3,4,5,6,7,8,9,10)&lt;br /&gt;
&lt;br /&gt;
creates an array of 10 numbers in the results table.&lt;br /&gt;
&lt;br /&gt;
There is not much one can do with a 10 element array directly from the shell,&lt;br /&gt;
however, each element of the array can be accessed separately using an array &lt;br /&gt;
element syntax such as is used in the following calc statement:&lt;br /&gt;
&lt;br /&gt;
 calc myres(3) myres(4)+myres(5) myres(6) /&lt;br /&gt;
&lt;br /&gt;
which modifies the 3rd element of the result myres based on an expression&lt;br /&gt;
using other elements of the result.  Note that to access a single element&lt;br /&gt;
of an atomic result, the result must already exist and not be a scalar.&lt;br /&gt;
This restriction is necessary to avoid confusion with vector results files&lt;br /&gt;
which are discussed in HELP VECTORED.&lt;br /&gt;
&lt;br /&gt;
An &amp;quot;abscissa mode&amp;quot; syntax can also be used for complex and vector sized &lt;br /&gt;
atomic results.  For example if myres is a complex result:&lt;br /&gt;
&lt;br /&gt;
 say &amp;quot;The real part is ^myres(~R) and the imaginary is ^myres(~I)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The following labels are recognized:&lt;br /&gt;
&lt;br /&gt;
 ~R is real part of complex   - same as 1&lt;br /&gt;
 ~I is imaginary of complex   - same as 2&lt;br /&gt;
 ~X is x-dimension of vector  - same as 1&lt;br /&gt;
 ~Y is y-dimension of vector  - same as 2&lt;br /&gt;
 ~Z is z-dimension of vector  - same as 3&lt;br /&gt;
 &lt;br /&gt;
It is sometimes more readable in macro code to use the &amp;quot;abscissa&amp;quot; syntax.&lt;br /&gt;
&lt;br /&gt;
The atomic element syntax can also be used in conjunction with vectored &lt;br /&gt;
results files by adding an extra semicolon followed by the atomic element &lt;br /&gt;
number within the parenthesis of the vectored results syntax.  For instance, &lt;br /&gt;
to reference the X-dimension of the Nth file element of the position component &lt;br /&gt;
in myfile, one could use the syntax:&lt;br /&gt;
&lt;br /&gt;
 say &amp;quot;The ^{N}th element's X-position is ^myfile(N;~POS;~X) meters&amp;quot; &lt;br /&gt;
&lt;br /&gt;
If atomic result appear in in-line expressions without an atomic element&lt;br /&gt;
syntax specifying one of the elements, the magnitude is used for complex and&lt;br /&gt;
vector sized results and the 1st element for all other sized results.&lt;br /&gt;
To perform arithmetic operations on complex atomic results, use the &lt;br /&gt;
calculator intrinsic command (see EXPLAIN CALCULATOR).&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Typecasting of atomic results is supported both on input and output but&lt;br /&gt;
does not allow modecasting.  (i.e. Complex can not be cast to Vector)&lt;br /&gt;
Mode casting can be performed by using the atomic element syntax and the&lt;br /&gt;
RESULTS or CALCULATOR commands if really necessary.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Results attributes can only be applied to atomic results parameters&lt;br /&gt;
has a whole (i.e. it is not possible to make only the second integer in a VI&lt;br /&gt;
results parameter read-only).  Any assignment of results attributes to an&lt;br /&gt;
atomic result's index will affect all indices of the atomic results parameter.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== TYPECASTING - GETTING TYPECAST&amp;lt;span id=&amp;quot;TYPECASTING&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ===&lt;br /&gt;
GETTING TYPECAST&lt;br /&gt;
&lt;br /&gt;
There are six types of results:  One STRING type and five numeric types ([[NXM_Help_RESULTS|see&lt;br /&gt;
HELP RESULTS]]).  Usually, the type of the result is implied.  In the&lt;br /&gt;
following: &lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; res abc 123&lt;br /&gt;
&lt;br /&gt;
the result ABC will end up Double precision, because 123 can be interpreted&lt;br /&gt;
as a number.  Conversely, &lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; res def MYSTRING&lt;br /&gt;
&lt;br /&gt;
will make DEF an STRING results parameter, since &amp;quot;MYSTRING&amp;quot; cannot be&lt;br /&gt;
interpreted as any kind of number (assuming you do not have a numeric result&lt;br /&gt;
parameter named MYSTRING).  But you can force the result to take any type you&lt;br /&gt;
like, by prefixing it with the first letter of the type and a colon.  Thus, &lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; res b:abc 123&lt;br /&gt;
&lt;br /&gt;
will store 123 into ABC as type Byte.  This becomes more useful when &lt;br /&gt;
making the distinction between STRING, which translates if possible, and&lt;br /&gt;
Untranslated, which never translates.  ([[NXM_Help_RESULTS|See HELP RESULTS]] for a &lt;br /&gt;
discussion of X-Midas types.)  Given the above definitions, &lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; res abc def&lt;br /&gt;
&lt;br /&gt;
will assign &amp;quot;MYSTRING&amp;quot; to ABC, since DEF could be translated, while&lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; res u:abc def&lt;br /&gt;
&lt;br /&gt;
will assign &amp;quot;DEF&amp;quot; to ABC.&lt;br /&gt;
&lt;br /&gt;
The most useful aspect of this convention is that it is not controlled by the&lt;br /&gt;
RESULTS command but by the shell; you can do explicit typecasting anyplace&lt;br /&gt;
that a result is stored or set.  For example, &lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; status sine1 i:sinesize&lt;br /&gt;
&lt;br /&gt;
will force SINESIZE to have an Integer type, even though STATUS normally&lt;br /&gt;
stores a Double precision value into a file size result. If you like, you can&lt;br /&gt;
even force STATUS to store an STRING result:&lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; status/quiet sine1 s:sinesize&lt;br /&gt;
 nM&amp;gt; res sinesize&lt;br /&gt;
 4S: SINESIZE        = 4096&lt;br /&gt;
&lt;br /&gt;
The typecasting syntax is used as a filter for displaying results parameters.&lt;br /&gt;
For example, the following command will display all Long integer results&lt;br /&gt;
parameters beginning with M:&lt;br /&gt;
&lt;br /&gt;
 nM&amp;gt; res l:m*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See also:  HELP RESULTS&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>