Modify Variable

Top  Previous  Next

You can display the Modify Variable Dialog by pressing the Modify Variable button in the Watches page of the Debugger.

 

The Modify Dialog shows basic information about the variable. It also displays the current value of the variable and lets you enter a new value. For example, entering a new integer value in the New Value box and clicking OK changes the variable to the new value.

 

Depending on the type of variable, the display will be slightly different. Reals, Integers and Strings have their own displays. Variables are generally shown in the format specified in the Watch Properties dialog.

 

1. Integers. If the value is an integer, you will have the option of entering either an integer or characters, since integers are sometimes used to store characters.

ModifyDlg

If the variable is an array, the variable to be modified will be the item specified by the index in the Watch Properties dialog.

 

2. Reals. Reals are displayed in the same format set by the watch's properties.

ModifyDlg3

 

3. Strings. You can change a string variable to any new string you want, as long as it is the same number of characters or less than the current string. If you enter a string that is longer than the original string, the debugger will truncate it to the original size. This is because there is only a certain amount of space reserved for each string.  If you exceed that reserved space, the string may overwrite adjacent variables and cause unpredictable behavior.

 

ModifyDlg2