Teledyne LeCroy BTTracer_Trainer - BTTrainer Users Manual User Manual
Page 319

301
CATC BTT
RAINER
2.11
C
HAPTER
User’s Manual
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 will evaluate 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 will evaluate 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.
Logical Operators
!
Negation
All combinations
of types
Integer
!0 = 1 !"cat" = 0
!9 = 0 !"" = 1
&&
Logical AND
All combinations
of types
Integer
1 && 1 = 1 1 && !"" = 1
1 && 0 = 0 1 && "cat" = 1
||
Logical OR
All combinations
of types
Integer
1 || 1 = 1 0 || 0 = 0
1 || 0 = 1 "" || !"cat" = 0
Operator
Symbol
Description
Operand
Types
Result
Types Examples
Operators (Continued)