The INTEGER function has two forms, each of which returns an integer value.
── INTEGER ── ( ──<arithmetic expression>── ) ─────────────────────────┤
This form of the INTEGER function returns the value of the arithmetic expression integerized with rounding. Specifically, it returns the following:
ENTIER(<arithmetic expression> + 0.5)
── INTEGER ── ( ─┬──────────────────┬─<pointer expression>── , ────────►
└─<update pointer>─┘
►─<arithmetic expression>── ) ─────────────────────────────────────────┤This form of the INTEGER function returns, as an integer value, the decimal value represented by the string of characters starting with the character pointed to by the pointer expression. The absolute value of the integer value to be returned must be less than or equal to 549755813887.
The arithmetic expression specifies the length of the string of characters and must, when rounded to an integer, have a value less than 24. If the rounded value of the arithmetic expression is 24 or greater, the program is terminated with a fault. If the length is 0 (zero), a result of 0 is returned.
A zone field configuration of 1"1101" in the least significant character position causes the result of the function to be negative. With 4-bit characters, a 1"1101" in the most significant character position results in a negative value.
When the pointer expression is a hexadecimal pointer, or a hexadecimal array, if the character in the most significant character position is not in the range 0 through 9, the character is assumed to be a sign. Accordingly, the number of characters processed is one greater than that specified by the arithmetic expression. Note that this extra character affects the value of the update pointer.
If the string of characters is 1"11111111" (48"FF") for 8-bit characters or 1"1111" (4"F") for 4-bit characters, the string is treated as though it were a sequence of nines. Note that in the 4-bit character case, the first character is treated as a sign (positive).
Other than the preceding special cases, if the numeric field of each character in the string of characters contains anything other than a digit, the results are undefined and can vary.
The state of the pointer expression when the count is exhausted can be preserved by the use of the <update pointer> construct.

