The special Evaluate Expression dialog box is used to monitor the step-by-step process of program execution and to calculate values of variables, arrays, expressions.
To open the dialog box, select the element, and execute one of the following operations:
Select the Debug > Evaluate Expression main menu item.
Press CTRL+F7.
Select the Evaluate Expression context menu item.
Click the Evaluate Expression button on the toolbar.
The Expression box shows the text of a evaluated expression. The drop-down list contains the last twenty calculated expressions. When the dialog box opens, this box displays the variable, over which the cursor is held in the macro window or the expression selected in the macro window. In other cases the box displays the last calculated expression from the list.
After the dialog box opens for the first time, the specified expression is calculated automatically. The calculation result is displayed as a tree containing all object properties, their values, and data type. The properties that in turn return the other object will also display the physical address in computer memory. The calculation hierarchy depth of any property is seven levels. On changing the text in the Expression box to calculate new values, click the Evaluate button.
Values of the object properties available for changing can be modified. To do this, enter appropriate values in the New Value box and click the Set button. Double-clicking any property in the Value area automatically substitutes its value in the New Value box.
To view information on an object, select the appropriate variable or code block in the program text and open the Evaluate Expression dialog box using one of the aforementioned methods or enter the object name in the edit box of the opened Evaluate Expression dialog box and click the Calculate button or press the ENTER key.
To view information on arrays, matrices and collections inherited from the IList and IDictionary interfaces, select corresponding variable in the program text and open the Evaluate Expression dialog box; or open the Evaluate Expression dialog box, type in name of the corresponding variable in the edit box and click the Evaluate button. The dialog box for browsing array values opens.
Clicking the View Expression button in the dialog box for browsing array values opens a dialog box with array parameters.
The Browse Values button enables the user to return to browsing array values.
To browse array elements, click the Browse Values button. The View the <array name> Array dialog box opens.
There is a list of all array dimensions in the left part of the window. By default, all elements of dimensions arranged by rows and columns are selected. Fixed dimensions have the first elements selected.
To change dimension position, hold down the cursor button on the icon in the left part and drag the dimension to the required position.
To view expression and open the Evaluate Expression dialog box, click the View Expression button.
To change array element value, select one of the methods:
In the Evaluate Expression dialog box:
Specify array element in the Expression box. To do this, execute one of the operations:
Select the array element in application text and open the Evaluate Expression dialog box. The array element will be inserted automatically.
Enter array element manually.
Specify new data in the New Value dialog box.
Click the Set button.
In the View the <array name> Array dialog box:
Execute one of the operations:
Double-click the element value in the array.
Select element value and press F2.
Press the ENTER key. If required, press the ESC key to return the previous value.
After executing the operations the array element value will be changed.
See also: