Description
If PascalString contains the characters of a number in any of the standard FutureBasic formats (decimal, hex, octal or binary), val returns the number's value. val ignores leading spaces in PascalString. When it finds a non-space character, it evaluates the remaining characters in PascalString until it encounters a character which is not part of the number. Thus, for example, the string "3245.6" would be evaluated as 3245.6, but the string "32W45.6" would be evaluated as 32. If the first non-space character in PascalString can't be recognized as part of a number, val returns zero. val performs the opposite of functions such as str$, hex$, oct$, bin$ and uns$.
Note
If PascalString represents an integer, consider using the val& function, which is faster.