ParseNumber Procedure
Converts a
String to a
Number.
The string must contain a valid number, otherwise an error is thrown.
Declaration
function ParseNumber(text as String) as Number
Parameters
- text as String — A string containing a number, like "123".
Return value
Number — The number represented by the string, like 123.
Possible error codes
- ERR_INVALID_NUMBER_FORMAT
Example
Code
dim num as Number
num = ParseNumber("-123.40")
print (num * 2)
Output