| Applying science to business management |
  
tonumber
Format: tonumber( text )
Arguments: [text] text Input text string(s)
Returns: [text,real] List of text strings and/or
numbers created by converting each input string to a number
Description: Tonumber converts a text string to real
number. If the string cannot be converted into a number, the
string remains unchanged. If you supply a list or matrix of text
strings, tonumber will convert each element individually. Tonumber
will properly filter currency symbols, parentheses to indicate
sign, thousand separators, and leading/training spaces.
Examples: tonumber("12345.67")
= 12345.67
tonumber("$12345.67") =
12345.67
tonumber("$12,345.67") =
12345.67
tonumber("($12345.67)") =
-12345.67
tonumber("97%") = 0.97
tonumber(["Cost","$12,345.67"])
= [Cost,12345.67]
See Also: tostring,
tolist, eval
|