29
Boolean Data Type (bool)
The boolean data type can store a value of TRUE or FALSE. This data type has no properties. There
are several operations that can be performed with the bool data type.
The examples below use the following two variables
bool b1, b2
b1 = TRUE
b2 = FALSE
Integer Data Type (int)
The integer data type can store whole numbers without decimal points. There are many mathematical
and comparison operations that can be performed with integer variables and properties.
The results of integer mathematical operators are always integers. For example, the result of 11/5 is 2.
Operators
Description
Example
==, EQ
Equals
b1 == b2 results in a value of
FALSE
<>, ! =, NE
Not Equal
b1 <> b2 results in a value of TRUE
&,AND
Logical AND
b1 AND b2, b1 & b2 each results in
a value of FALSE
I, OR
Logical OR
b1 OR b2, b1 | b2 each results in
a value of TRUE
!, NOT
Logical NOT
!b1 results in a value of FALSE
=
Assignment
b1=false results in b1 storing a
value of FALSE
Symbols
Description
<, LT
Less Than
>, GT
Greater Than
<=, LE
Less Than or Equal To
>=, GE
Greater Than or Equal To
==, EQ
Equal To
<>, !=, NE
Not Equal To
+
Add
-
Subtract
*
Multiply
/
Divide
%
Remainder (Modulo)