SET EVALUATE

Display the value of an expression.

Syntax

SET EVALUATE [format] [size] [/LEVEL[=number]] [/WINDOW[=number]] [/TYPE] expression

Parameters

format

One of the following:

/ASCII [:length]

/OCT or /OCTAL

/HEX

/DEC

/BINARY

Values are shown in binary, decimal, hexadecimal, or octal notation when the /BINARY, /DEC, /HEX, or /OCT option is used.

The option /ASCII is used to show a char pointer or a char array as a readable string enclosed in double quotes (“”). Non-printable characters are shown as ‘.' signs. By default, a string is shown up to the first 0-byte. This can be avoided by giving a length declaration after the /ASCII qualifier separated by ‘:' (/ASCII:length). Then up to length bytes are shown where length is any expression.

size

The type of memory access. Possible values are:

/BYTE

/WORD

/LONG

The amount of memory read from the target must be a multiple of the selected size. The default is /BYTE. The size parameter may be used with any format qualifier. It is ignored when /ASCII is used which forces byte access.

/LEVEL[=number]

If the expression to be evaluated denotes a structure containing sub-structures, the /LEVEL option limits the depth of the evaluation to the number number. If the depth number is omitted, the complete substructures are displayed. This is also the case if the /LEVEL option is omitted.

/WINDOW[=number]

The ID number of the Evaluations window. Using a new ID number creates a new window. If an Evaluations window with the ID number exists already, this window now evaluates this expression instead of its previous expression. If no window number is specified, the value is always shown in the window with the id=0. If commands such as STEP, RUN, NEXT are performed and the value of the expression changes, the value is automatically updated and displayed using the Enhanced Foreground Color.

/TYPE

The type of a variable is displayed in the Console window. If /WINDOW has been specified, the type is shown in the Evaluations window. For example, if the following command is entered, the type of the variable var2 is displayed:

SET EVALUATE /TYPE var2

In the Console window appears the following output:

TEST\CALL_BY_VALUE\VAR2: char (bits:8) * (bits:32)

expression

The expression to be evaluated. Must be in the notation of the currently selected language. See Assembler Expressions Overview for the grammar of legal expressions.

Description

This command evaluates the specified expression and the result is displayed in the Console window (default). If no option is supplied, the output is formatted according to the type of the result. If commands such as STEP, RUN, NEXT are performed, the value of the displayed expression is automatically updated and displayed in the Console window.

All members of structured data types are shown with their member names. The value of a union is shown in the format of all union members. All elements of arrays are displayed. By default, scalar values are stated in decimal and all pointers in hexadecimal notation.

If a pointer has the value 0, the string “(NIL)” is printed. In case of function pointers, the name of the procedure referenced by the pointer is printed.

Example

SET EVALUATE statusflag
SET EVALUATE /WINDOW=1 iomode\write\arglen
SET EVALUATE token[type]->t_base

See Also


For more complete information about compiler optimizations, see our Optimization Notice.