n = ToNumber(s$[, base])
s$
to a number.
The optional argument base
can be used to convert binary, octal, and
hexadecimal numbers or any other bases ranging from 2 to 36. It defaults to 10
(decimal). In bases from 11 to 36 the letters of the English alphabet are
used as the additional digits (10=A, 35=Z). Case sensitivity is not
required.
Starting with Hollywood 6.0 this function can also convert a variable
of type #LIGHTUSERDATA
to a number. Since this variable type is meant
to store pointers, it is only interesting for expert users or debugging
purposes.
r = ToNumber("10000") ; returns 10000 r = ToNumber("10110111", 2) ; returns 183 r = ToNumber("523", 8) ; returns 339 r = ToNumber("FFFF", 16) ; returns 65535