5.2. Modify the Value of a Watch Variable
About this task
When the debugger has control , you can modify the value of any of the variables on Program Editor's Watch variable list.
- Procedure to modify variables.
- Guidelines for modifying variables.
Procedure to Modify Variables
Procedure
Results
The new variable value displays in the Watch list.
guide:
Guidelines for Modifying Variables
- When changing the value of a variable, the Program Editor converts the new value to be of the same type as the variable being changed.
Example
An Integer value is 3.
1.7 is entered in the Value field
The Program Editor converts the new value to 2.
- When modifying a
Variant
variable, the Program Editor needs to determine both the type and value of the data. Program Editor uses the following logic in performing this assignment (in this order):
If the new value is | The variant variable is assigned: |
Null | Null (VarType 1) |
Empty | Empty (VarType 0). |
True | True (VarType 11). |
False | False (VarType 11). |
number | The value of number. The type of the variant is the smallest data type that fully represents that number. You can force the data type of the variable using a type-declarator letter following number, such as %, #, &, !, or @. |
date | The value of the new date (VarType 7) |
Anything else | String (VarType 8). |
- The Program Editor will not assign a new value if it cannot be converted to the same type as the specified variable.