10.06.2016 Views

eldo_user

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Eldo Netlist Setup<br />

Operators<br />

Operators<br />

This topic is divided into the following:<br />

Operator Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br />

Arithmetic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

Boolean Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

Bitwise Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br />

Operator Precedence<br />

The order of precedence and associativity of operators in Eldo affect the evaluation of<br />

expressions. For example, in the expression a=2+b*3, which happens first? the addition or the<br />

multiplication? Expressions with higher-precedence operators are evaluated first.<br />

Table 4-4 summarizes the precedence from highest to lowest and associativity (the order in<br />

which the operands are evaluated) of Eldo operators. Where several operators appear together,<br />

they have equal precedence and are evaluated according to their associativity.<br />

Table 4-4. Operator Precedence<br />

Operator Description Associativity<br />

() function call left-to-right<br />

! - logical NOT, unary negation right-to-left<br />

** ^ power, power (synonym) left-to-right<br />

* / multiply, divide left-to-right<br />

+ - add, subtract left-to-right<br />

> bitwise left shift, bitwise right shift left-to-right<br />

< >= less than, less than or equal, greater than, left-to-right<br />

greater than or equal<br />

== != equal, not equal left-to-right<br />

& bitwise AND left-to-right<br />

| bitwise OR left-to-right<br />

&& logical AND left-to-right<br />

|| logical OR left-to-right<br />

Related Topics<br />

Arithmetic Operators<br />

Operators<br />

Eldo® User's Manual, 15.3 115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!