Watching global variables

From m204wiki
Revision as of 00:23, 1 November 2022 by Ekern (talk | contribs)
Jump to navigation Jump to search

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