Watching global variables: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
# <span class="f_ListNum1">Click the </span><var>Watch</var><span class="f_ListNum1"> button. </span><span class="f_ListContinue">The current value of the variable is displayed in the </span><var>Watch Window</var><span class="f_ListContinue">:</span> | # <span class="f_ListNum1">Click the </span><var>Watch</var><span class="f_ListNum1"> button. </span><span class="f_ListContinue">The current value of the variable is displayed in the </span><var>Watch Window</var><span class="f_ListContinue">:</span> | ||
[[File:watchglobala4_zoom65.gif|368x227px|watchGlobalA4]]<span class="f_ListContinue"> </span> | : [[File:watchglobala4_zoom65.gif|368x227px|watchGlobalA4]]<span class="f_ListContinue"> </span> | ||
'''Note:'''<span class="f_ListNote"> For global variables whose names are all uppercase, you can omit the quotation marks. In this case, the Debugger searches for (only) the variable with the all uppercase form of the name. Whether you specify </span><span class="term">g.next</span><span class="f_ListNote"> or </span><span class="term">g.Next</span><span class="f_ListNote"> or </span><span class="term">g.NEXT</span><span class="f_ListNote">, the value of only the global variable </span><span class="term">NEXT</span><span class="f_ListNote"> is displayed. </span> | : '''Note:'''<span class="f_ListNote"> For global variables whose names are all uppercase, you can omit the quotation marks. In this case, the Debugger searches for (only) the variable with the all uppercase form of the name. Whether you specify </span><span class="term">g.next</span><span class="f_ListNote"> or </span><span class="term">g.Next</span><span class="f_ListNote"> or </span><span class="term">g.NEXT</span><span class="f_ListNote">, the value of only the global variable </span><span class="term">NEXT</span><span class="f_ListNote"> is displayed. </span> | ||
<span class="f_Para">For a global variable referenced by $GETG, you can also </span><span class="f_ListBul1">right click its program line and select </span><var>Add Watch</span><span class="f_ListBul1"> from the context menu. </span> | <span class="f_Para">For a global variable referenced by $GETG, you can also </span><span class="f_ListBul1">right click its program line and select </span><var>Add Watch</span><span class="f_ListBul1"> from the context menu. </span> | ||
Line 20: | Line 20: | ||
'''See Also''' | '''See Also''' | ||
* | * [[Watching Model 204 fields|Watching Model 204 fields]] | ||
* | * [[Viewing dummy string variables|Viewing dummy string variables]] | ||
[[Category:Debugger Home]] | [[Category:Debugger Home]] |
Latest revision as of 18:04, 25 April 2023
Like Model 204 fields, watched global variables must be specified using a prefix. To watch a global variable:
- In the Entity name input box, specify G. or g. followed by the variable's name within single quotation marks. For example: g.'Next'
- Click the Watch button. The current value of the variable is displayed in the Watch Window:
- Note: For global variables whose names are all uppercase, you can omit the quotation marks. In this case, the Debugger searches for (only) the variable with the all uppercase form of the name. Whether you specify g.next or g.Next or g.NEXT, the value of only the global variable NEXT is displayed.
For a global variable referenced by $GETG, you can also right click its program line and select Add Watch from the context menu.
The global variable is added to the Watch Window and its current value is displayed.
To view the variable value without adding it to the Watch Window, you can right click the program line and select the Display option. The value is shown in a separate Value window.
The Client also recognizes and evaluates $STATUS, $STATUSD, and $CURREC.
See Also