
HAPTER
Symbol
Description
Ty
p
es
Ty
p
es
Examples
Equality Operators
Equal
Integer-integer
Integer
String-string
Integer
Raw byte-raw byte
Integer
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
String-string
Integer
Raw byte-raw byte
Integer
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
String-string
Integer
Greater than
Integer-integer
Integer
String-string
Integer
Less than or
equal
Integer-integer
Integer
String-string
Integer
Greater than or
equal
Integer-integer
Integer
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
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
Table 4.2: Operators (Continued)
Komentarze do niniejszej Instrukcji