3.3.1 integer

The integer-type is a basic data type that contains a numeric character in the range from -2,147,483,648 to +2,147,483,647. Data of this type cannot include any decimals and exponents.

The keyword integer allows you to declare integer-type variables and initialize variables and constants. You can use this keyword only in the DEFINE section. When you specify two or more variables after this keyword, use a comma (,) to delimit them.

You can declare a constant by using the keyword const in combination with the keyword integer. The values of the constants declared in the DEFINE section can only be referenced, and cannot be changed in the MAIN or ERROR section.

Organization of this subsection
(1) Format
(2) Example of coding
(3) Notes

(1) Format

DEFINE
{
  [const] integer variable_name1 [= integer_constant1] [, variable_name2 [= integer_constant2] ];
}

(2) Example of coding

DEFINE
{
   const integer OK_END = 0, NG_END = -1 ; // Enabled
   integer end_status, return_code;        // Initialized at 0
}

(3) Notes