The Integer Data Type is used to represent whole numbers. Valid values (literals) are -2147483648 to 2147483647 (inclusive). Integers can be combined with Arithmetic operators to create Expressions. Arithmetic expressions containing Integers cannot contain Booleans, Floats or Strings.
The short syntax structure uses the word INT:
NEW INT VARIABLE = VALUEThe long syntax structure uses the word INTEGER:
NEW INTEGER VARIABLE EQUAL TO VALUENEW INT x = 5
PRINTLN x // Displays "5"NEW INT x = 5
NEW INT y = x
PRINTLN y // Displays "5"NEW INT x = 5
NEW INT y = x + 5
PRINTLN y // Displays "10"NEW INT x = TRUE // Runtime error! Cannot assign Boolean Literal to Integer Data Type
PRINTLN x // This line is not executed because the program crashed!NEW INT x = 1.0 // Runtime error! Cannot assign Float Literal to Integer Data Type
PRINTLN x // This line is not executed because the program crashed!NEW INT x = "1" // Runtime error! Cannot assign String Literal to Integer Data Type
PRINTLN x // This line is not executed because the program crashed!