Futurebasic/Language/Reference/val amp
VAL&
[edit | edit source]Syntax
[edit | edit source]integerValue& = VAL&(string$)
Description
[edit | edit source]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 VAL
.
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 VAL&
.
See Also
[edit | edit source] VAL; MKI$; CVI; STR$; HEX$; OCT$; BIN$; UNS$;
<image was here>
Appendix C: Data Types and Data Representation