Watching global variables: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 20: Line 20:


'''See Also'''
'''See Also'''
* <span class="f_SimpleList">[[Watching Model 204 fields|Watching Model 204 fields]] </span>
* [[Watching Model 204 fields|Watching Model 204 fields]]  
* <span class="f_SimpleList">[[viewing_dummy_strings.html|Viewing dummy string variables]] </span>
* [[Viewing dummy string variables|Viewing dummy string variables]]  


[[Category:Debugger Home]]
[[Category:Debugger Home]]

Revision as of 00:23, 1 November 2022

Like Model 204 fields, watched global variables must be specified using a prefix. To watch a global variable:

  1. In the Entity name input box, specify G. or g. followed by the variable's name within single quotation marks. For example: g.'Next'
  2. Click the Watch button. The current value of the variable is displayed in the Watch Window:

watchGlobalA4

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.

globalVar3a

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