SourcePoint AMD Help

Table of Contents

Expressions

Expressions consist of one or more operands combined with operators.  The assignment operator may be used once in an expression

Operands

Valid operands include constants, control variables, debug variables, debug procedures, symbolic references (user-program symbols), register names, and memory accesses.

Operators

The following table lists the emulator operators in order of precedence and describe how evaluation occurs. Precedence determination parallels the C programming language. Expressions containing the logical operators &&, ||, and ^^ evaluate left to right and terminate as soon as a result is determined.

Emulator Operators in Order of Precedence

Category

Symbol

Associate

Function

primary

()

left

group expressions

 

[ ]

left

index into string

right-unary

++

left

post-increment

 

- -

left

post-decrement

left-unary

*

left

indirection

 

-

left

unary minus

 

!

left

logical NOT

 

~

left

bitwise NOT

 

++

left

pre-increment

 

- -

left

pre-decrement

binary

*

left

multiplication

 

/

left

division

 

%

left

modulus

 

+

left

addition

 

-

left

subtraction

 

<<

left

shift left

 

>>

left

shift right

 

<

left

less than

 

>

left

greater than

 

<=

left

less than or equal

 

>=

left

greater than or equal

 

==

left

equivalence

 

!=,<>

left

non-equivalence

 

&

left

bitwise AND

 

|

left

bitwise OR

 

^

left

bitwise XOR

 

&&

left

logical AND

 

^^

left

logical XOR

 

||

left

logical OR ternary

 

?:

right

three-element conditional expression
(for example: (a>b)?(a):(b) displays the greater value, a or b)

assignment

=

right

simple assignment

 

+=

right

implied operand addition

 

-=

right

implied operand subtraction

 

*=

right

implied operand multiplication

 

/=

right

implied operand division

 

%=

right

implied operand modulus

 

>>=

right

implied operand right shift

 

<<=

right

implied operand left shift

 

&=

right

implied operand bitwise AND

 

^=

right

implied operand bitwise XOR

 

|=

right

implied operand OR

Type Conversions

Type conversions occur automatically. If the two operands associated with a binary operator are of different types, an implicit type conversion is done to make the two the same type. Before a conversion takes place, however, the object to be converted is expanded to its maximum precision. An error message is generated if the conversion is not allowed.