<?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=SET</id>
	<title>SET - 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=SET"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=SET&amp;action=history"/>
	<updated>2026-04-10T12:49:22Z</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=SET&amp;diff=755&amp;oldid=prev</id>
		<title>ConvertBot: Set a value in the results table (or one of its objects)</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=SET&amp;diff=755&amp;oldid=prev"/>
		<updated>2020-04-27T22:04:47Z</updated>

		<summary type="html">&lt;p&gt;Set a value in the results table (or one of its objects)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Set a value in the results table (or one of its objects)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;LABEL&amp;gt;  Result name (or path to an object's field or method)&lt;br /&gt;
&amp;lt;VALUE&amp;gt;  Value of parameter, field, or last argument of method&lt;br /&gt;
&lt;br /&gt;
In its simplest form, this command is used to assign a &amp;lt;VALUE&amp;gt; to a result named&lt;br /&gt;
&amp;lt;LABEL&amp;gt; in the results table. The simple form of SET mirrors the two-argument&lt;br /&gt;
form of RESULTS.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;LABEL&amp;gt; points to a field or method in an object, it will invoke the named&lt;br /&gt;
method with the argument equal to &amp;lt;VALUE&amp;gt;.  If the method has multiple&lt;br /&gt;
arguments it can be specified in one of two ways: (1) all arguments are part of&lt;br /&gt;
&amp;lt;LABEL&amp;gt; and &amp;lt;VALUE&amp;gt; is blank, or (2) the first N-1 arguments are part of &amp;lt;LABEL&amp;gt;&lt;br /&gt;
and the Nth argument is &amp;lt;VALUE&amp;gt;. See examples below. Note that (1) is extremely&lt;br /&gt;
similar to INVOKE, except that INVOKE has the ability to put the method's return&lt;br /&gt;
value in a result.&lt;br /&gt;
&lt;br /&gt;
Evaluating Numerical Expressions:&lt;br /&gt;
---------------------------------&lt;br /&gt;
SET can evaluate simple numerical expressions prior to storing the result.&lt;br /&gt;
  nM&amp;gt; set x 1+1&lt;br /&gt;
  nM&amp;gt; res x&lt;br /&gt;
    L: X               = 2&lt;br /&gt;
&lt;br /&gt;
Note that, other then parentheses, precedence rules are not followed, the &lt;br /&gt;
expression is evaluated left to right.&lt;br /&gt;
  nM&amp;gt; set x 1+1/2&lt;br /&gt;
  nM&amp;gt; res x&lt;br /&gt;
    L: X               = 1&lt;br /&gt;
  nM&amp;gt; set x 1+(1/2)&lt;br /&gt;
  nM&amp;gt; res x&lt;br /&gt;
    D: X               = 1.5&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  1. Set a result PI to 3.14 and then view it with the RESULTS command:&lt;br /&gt;
        nM&amp;gt; SET pi 3.14&lt;br /&gt;
        nM&amp;gt; RESULTS pi&lt;br /&gt;
        D: PI      = 3.14&lt;br /&gt;
&lt;br /&gt;
  2. Three ways to set multiple values in an object (all of these examples call&lt;br /&gt;
     the setXBounds(min,max) method with the arguments 1 and 2):&lt;br /&gt;
       a. All arguments given in method call:&lt;br /&gt;
            nM&amp;gt; plot/bg apenny&lt;br /&gt;
            nM&amp;gt; set reg.plot.setXBounds(1,2)&lt;br /&gt;
&lt;br /&gt;
       b. N-1 arguments given in method call:&lt;br /&gt;
            nM&amp;gt; plot/bg apenny&lt;br /&gt;
            nM&amp;gt; set reg.plot.setXBounds(1) 2&lt;br /&gt;
&lt;br /&gt;
       c. Alternative method using the INVOKE command:&lt;br /&gt;
            nM&amp;gt; plot/bg apenny&lt;br /&gt;
            nM&amp;gt; invoke ,, reg.plot.setXBounds(1,2)&lt;br /&gt;
&lt;br /&gt;
     Note that (b) is rarely used in new applications since the other forms are&lt;br /&gt;
     more easily recognized as calls to a specific Java method. Option (b) was&lt;br /&gt;
     used in older versions of NeXtMidas (prior to 1.8.0) as it predated both&lt;br /&gt;
     (a) and (c).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
  Scope:&lt;br /&gt;
    /GLOBAL    - Sets the result in the GLOBAL results table&lt;br /&gt;
    /PARENT    - Sets the result in the PARENT result table&lt;br /&gt;
&lt;br /&gt;
  Setting Results:&lt;br /&gt;
    /ADDROOT   - Automatically add roots of tables&lt;br /&gt;
    /FORCE     - Sets in a readonly table&lt;br /&gt;
&lt;br /&gt;
See Also: GET, RESULTS, INVOKE&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>