beautypg.com

Examples: evaluation order – Rockwell Automation FactoryTalk View Site Edition Users Guide User Manual

Page 556

background image

F

ACTORY

T

ALK

V

IEW

S

ITE

E

DITION

U

SER

S

G

UIDE

20–10

• •

Examples: Evaluation order

In the following examples, tag1 = 5, tag2 = 7, and tag3 = 10.

_____________________________

(tag1>tag2) AND (tag1

is evaluated in this sequence:

1. tag1>tag2=0

2. tag1

3. 0 AND 1=0

The expression evaluates to 0 (false).

_____________________________

tag1>tag2 AND tag3

is evaluated in this sequence:

1. tag2 AND tag3=1

2. tag1>1=1

3

*
/
MOD, %
**
AND, &&
&
>>
<<

4

+

OR, ||
|
^

5

EQ, =
NE, <>
LT, <
GT, >
LE, <=
GE, >=

Evaluation order

Symbols