Setting the value of a variable: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__TOC__ <span class="f_Para">You may set or update the value of certain types of variables with the Janus and TN3270 Debuggers. The following types of variable values may be m...") |
No edit summary |
||
Line 20: | Line 20: | ||
: 3. Select <span class="term">Change Value</span>. | : 3. Select <span class="term">Change Value</span>. | ||
:: A <span class="term">Set %var</span> dialog box like the following displays, where <span class="term">%var</span> is replaced by the variable you are modifying, and the variable's current value is displayed: | :: A <span class="term">Set %var</span> dialog box like the following displays, where <span class="term">%var</span> is replaced by the variable you are modifying, and the variable's current value is displayed: | ||
[[File:setvarwin3_zoom60.gif|371x95px|setvarWin3]] | :: [[File:setvarwin3_zoom60.gif|371x95px|setvarWin3]] | ||
: 4. <span class="f_ListNum1">Specify the new variable value, and click </span><var>Set</var><span class="f_ListNum1"> or press the Enter key. </span> | : 4. <span class="f_ListNum1">Specify the new variable value, and click </span><var>Set</var><span class="f_ListNum1"> or press the Enter key. </span> | ||
:: The <var>Watch Window</var> is refreshed with the new value, <span class="term">Variable Set</span> displays in the [[Status bar|Status bar]], and the new value becomes the current value of the variable <span class="term">in the program</span> at the current point of program execution. | :: The <var>Watch Window</var> is refreshed with the new value, <span class="term">Variable Set</span> displays in the [[Status bar|Status bar]], and the new value becomes the current value of the variable <span class="term">in the program</span> at the current point of program execution. |
Latest revision as of 13:44, 25 April 2023
You may set or update the value of certain types of variables with the Janus and TN3270 Debuggers. The following types of variable values may be modified:
- String %variables
- Unicode %variables
- Float %variables
- Fixed %variables
- Longstrings (255 character limit)
- Global variables
- Screen and Image items
- Boolean enumeration variables (only True and False [case not important] are valid values)
Currently, only scalar variables may be set; array elements may not be set. In addition, most object variables may not be set.
To set the value of a variable with the Debugger:
- Add the variable to the Watch Window.
- In the Watch Window, right click the variable.
- If this type of variable can be set, and it is settable at this point in the execution of the program, the Change Value context menu option is enabled.
- 3. Select Change Value.
- 4. Specify the new variable value, and click Set or press the Enter key.
- The Watch Window is refreshed with the new value, Variable Set displays in the Status bar, and the new value becomes the current value of the variable in the program at the current point of program execution.
The setM204Data command is equivalent to right clicking a Watch Window item and selecting Change Value.
Note: Setting a new value in the Debugger follows the rules of User Language assignment. For example, specifying a text value for a float variable results in setting the variable to zero.
See Also: