integerValue& = VAL&(string$)
This function is similar to the
VAL function, but it can only evaluate a string which represents an integer. The advantage of using
VAL& is that it executes more quickly than
string$ can represent an integer in decimal, hex, octal or binary format. The absolute value of the represented integer must not exceed 4,294,967,295.
VAL& ignores leading spaces in
string$, and it stops evaluating the string when it encounters a character that is not part of standard integer notation. Note that this means
VAL& will stop evaluating the string when it encounters a decimal point or an "
E" exponent indicator. That means that certain strings which represent integers will be evaluated differently by
VAL than by
VAL&. For example, the string "
24.61E2" will be evaluated as 2461 by
VAL, but as 24 by