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.