Eyeon:Script/Reference/Libraries/base/tonumber
From VFXPedia
Contents |
Base : tonumber
Arguments
tonumber(val, [base] )
- val (required, any)
The value that will be converted to a number.
- base (optional, int)
An integer between 2 and 36 specifying the base number system used for conversion.
Returns
Returns the value 'val' as converted to a number, or nil if val cannot be converted to a number.
Remarks
This function tries to convert its 'val' argument to a number. If the conversion is possible the function will return that value as a number, otherwise it will return nil.
The base option allows you to specify the base numeral system used to interpret the numeral. The default base used if no argument is provided will be base 10. Any base between 2 and 36 can be used. For bases greater than 10 the letter A will be used to represent 11, B for 12, and so on until Z representing 35.
In base 10 the number may have a decimal part as well as an optional exponent part. In other bases only unsigned integers will be accepted.
Requirements
- eyeonScript 5.0
- Fusion 5.0
Examples
No examples at thistime