beautypg.com

Teledyne LeCroy Protocol Analyzers File-Based Decoding User Manual User Manual

Page 18

background image

Chapter 4: Operators

File-based Decoding User Manual

12

LeCroy Corporation

Equality Operators

==

Equal

Integer-integer

Integer

2 == 2

String-string

Integer

"three" == "three"

Raw byte-raw byte

Integer

'001122' == '001122'

List-list

Integer

[1, [2, 3]] == [1, [2, 3]]
*Note: equality operations on values of different
types evaluates to false.

!=

Not equal

Integer-integer

Integer

2 != 3

String-string

Integer

"three" != "four"

Raw byte-raw byte

Integer

'001122' != '334455'

List-list

Integer

[1, [2, 3]] != [1, [2, 4]]
*Note: equality operations on values of different
types evaluates to false.

Relational Operators

<

Less than

Integer-integer

Integer

1 < 2

String-string

Integer

"abc" < "def"

>

Greater than

Integer-integer

Integer

2 > 1

String-string

Integer

"xyz" > "abc"

<=

Less than or equal

Integer-integer

Integer

23 <= 27

String-string

Integer

"cat" <= "dog"

>=

Greater than or
equal

Integer-integer

Integer

2 >= 1

String-string

Integer

"sun" >= "moon"
*Note: relational operations on string values are
evaluated according to character order in the ASCII
table.

Operator
Symbol

Description

Operand Types

Result
Types Examples

Table 4.2 Operators (Continued)