FutureBasic Logo

<<    Index    >> FutureBasic

val&   function



Syntax
integerValue = val&( PascalString )

Description
This function is similar to the val function, but it can only evaluate a string which represents an integer. 
PascalString 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 PascalString, 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
val; dblVal; intVal; mki; cvi; str; hex; oct; bin; uns$; Appendix C - Data Types and Data Representation