INTEGER

The INTEGER data type is used for storing large whole numbers.

Syntax

INTEGER
  1. INT and INTEGER are synonyms.

Usage

The storage of INTEGER variables is based on 4 bytes of signed data ( = 32 bits ).

The value range is from -2,147,483,647 to +2,147,483,647.

INTEGER variables can be initialized with integer literals:
MAIN
  DEFINE i INTEGER
  LET i = 1234567
  DISPLAY i 
END MAIN

Assigning a whole number that exceeds the INTEGER range raises overflow error -1215, which can be trapped with WHENEVER ANY ERROR or a TRY/CATCH block.

INTEGER variables are initialized to zero in functions, modules and globals.

The INTEGER type can be used to define variables storing values from SERIAL columns.

Data type conversion can be controlled by catching the runtime exceptions. For more details, see Handling type conversion errors.