numericValue = val( PascalString )
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
data "-3.2", "1.4E2", "&4C1", "9+7"
for i = 1 to 4
print s$, val(s$)
PascalString represents an integer, consider using the
val& function, which is faster.
val&; mki$; cvi; str$; hex$; oct$; bin$; uns$; Appendix C - Data Types and Data Representation