TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Using Expressions

An expression is a formula that defines the computation of a value. The debugger accepts most valid Ada or C/C++ expressions in the Expression field of dialog boxes such as the Modify Data dialog box. Expressions are evaluated using the programming language grammar rules.

Binary Operators

The debugger performs arithmetic using the following binary operators.

For Ada:

For C/C++:

The operands to the Ada AND and OR or C/C++ && and || operations must be integer or boolean; floating point operands are not allowed. If both operands to AND or && are non-zero, the result is nonzero. If either or both operands to AND or && are 0, the result is 0. If either or both operands to OR or || are 1, the result is 1. If both operands to OR or || are 0, the result is 0.

Unary Operators

The Ada debugger supports the following unary operators:

+   
-

For debugging C, the following unary operators are supported:

&

returns the address of its operand

*

dereferences pointers

Operands

Operands can be numbers (integers or floating point), program variables or function calls. More than one function call can appear in the same expression. Use functions calls as parameters to other function calls, etc.

In an expression, the debugger implicitly converts an integer number to a floating point number if the integer is one operand of a binary operation (+, -, *, /) and the other operand is a floating point number.

The comparison operators in the following list return an integer value of either 0 (False) or 1 (True).

Currently, the final value of an expression must have type Integer (Ada), type Int (C/C++), or type Float. Also, any operand to one of the above operators must be an integer or floating point value. Access values are currently converted to 32-bit integers.

More information on expressions can be found in Using the Apex Debugger.


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS