RAD Studio (Common)
ContentsIndex
PreviousUpNext
Evaluate/Modify

RunEvaluate/Modify 

Evaluates or changes the value of an existing expression or property. This is useful if you want to test a code correction without having to exit the debugger, change the source code, and recompile the program.

Item 
Description 
Evaluate  
Evaluates the expression in the Expression edit box and displays its value in the Result edit box.  
Modify  
Changes the value of the expression in the Expression edit box using the value in the New Value edit box.  
Watch  
Creates a watch for the expression you have selected.  
Inspect  
Opens a new Debug Inspector on the data element you have selected. This is useful for seeing the details of data structures, classes, and arrays.  
Expression  
Enter the variable, field, array, or object to evaluate or modify. By default, the word at the cursor position in the Code Editor is placed in the Expression edit box. You can accept this expression, enter another one, or choose an expression from the history list of previously evaluated expressions.
To evaluate a function call, enter the function name, parentheses, and arguments as you would type it in your program, but leave out the statement-ending semicolon (;).  
Result  
Displays the value of the item specified in the Expression text box after you choose Evaluate or Modify.  
New value  
Assigns a new value to the item specified in the Expression edit box. Enter a new value for the item if you want to change its value.  

Note: You can evaluate any valid language expression or static variables that are accessible from the current execution point.

By default, the debugger displays the result in the format that matches the data type of the expression. For example, Integer values are displayed in decimal format. To change the display format, type a comma (,) followed by a format specifier after the expression. 

The following table describes the Evaluate/Modify format specifiers.

Specifier 
Types affected 
Description 
,C  
Char, strings  
Character. Shows characters for ASCII 0 to 31 in the Delphi language #nn notation.  
,S  
Char, strings  
String. Shows ASCII 0 to 31 in Delphi language #nn notation.  
,D  
Integers  
Decimal. Shows integer values in decimal form, including those in data structures.  
,H or ,X  
Integers  
Hexadecimal. Shows integer values in hexadecimal with the $ prefix, including those in data structures.  
,Fn  
Floating point  
Floating point. Shows n significant digits where n can be from 2 to 18. For example, to display the first four digits of a floating-point value, type ,F4. If n is not specified, the default is 11.  
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!