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