The Plus operator adds two numeric values together. Mixing Data Types (e.g. Integers and Floats) is not allowed and the Plus operator does not work on Strings or Booleans.
The short syntax structure uses the + symbol:
PRINT VALUE + VALUEThe long syntax structure uses the word PLUS:
PRINT VALUE PLUS VALUENEW INT x = 42 + 7
PRINT x // Displays "49"NEW FLOAT x = 3.14 + 2.86
PRINT x // Displays "6.0"NEW INT x = 10
NEW INT y = 5
PRINT x + y // Displays "15"NEW INT counter = 0
SET counter = counter + 1
PRINT counter // Displays "1"NEW INT i = 1
NEW INT result = 0
WHILE i <= 5
SET result = result + i
SET i = i + 1
END WHILE
PRINT result // Displays "15"NEW INT x = 5
NEW FLOAT y = 2.5
PRINT x + y // Type error! Cannot mix Integer and Float Data TypesPRINTLN "Hello" + "World" // Type error! The Plus operator is used for arithmetic. Strings use the Concatenate operator instead