IVAL is like VAL, in that a number in string form is converted to numeric form. Unlike VAL, which can only convert decimal numbers, IVAL can convert numbers in binary, octal, decimal and hexadecimal.
The string expression contains the number to be converted and the radix must be either 2, 8, 10 or 16. The characters in the string must be legal digits in the specified radix. For example, a binary number can only have characters "0" and "1". Only decimal numbers are allowed to have a minus sign preceding them.
The number expressed in the string is first converted to a 16 bit integer. If the most significant bit is set, the result will be negative. Thus, the string must represent a number within the range of a 16 bit signed integer. The range restrictions are as follows: