# integer

The keyword integer denotes a simple basic type whose distinguished values are the positive and negative whole numbers, including zero.

- Values of integer type shall be denoted by one or more digits; the first digit shall not be zero unless the value is 0.
- The value zero shall be represented by a single zero.
- The range of the permitted integer values may be specified.
- The specified range may be infinite (both positive and negative; see the keyword infinity).
- Another way to limit the permitted integer values is to list them.
- Value list and value range restrictions may be combined
- Predefined function operating on integer numbers:

- int2float converts an integer value into a floating point number .

Related keyword:

- bit2int
- char2int
- float2int
- hex2int
- infinity
- int2bit
- int2char
- int2float
- int2hex
- int2oct
- int2str
- int2unichar
- lengthof
- oct2int
- regexp
- sizeof
- str2int
- substr
- unichar2int

### integer

Example 1:

var integer v_egeesz := 65213;

The variable defined is called v_egeesz and has the initial value 65213.

Example 2:

var integer v_tartomaany (3 .. 7);

The variable v_tartomaany may have the following values: 3, 4, 5, 6, 7.

Example 3:

var integer v_schlagbaum (12, -12);

The variable called v_schlagbaum may hold the values 12 and -12 only .

Example 4:

var integer v_2hataar ( 1, 3, 7 .. 9, 11 );

The variable v_2hataar may hold the values 1, 3, 7, 8, 9, 11.

Example 5:

const float c_csarnoka := int2float (3);

The constant called c_csarnoka will have the floating point value 3.0.

BNF definition of integer
BNF definition of integer value