ToNumeric()
Converts given value to a number
ToNumeric( value=any, radix=any );
Returns: Number
| Argument | Description |
|---|---|
|
value
any,
required
|
edit
Value that should be converted to a numeric value |
|
radix
any,
optional
|
edit
The base for conversion of the given value, default is 10 Supported values are:
|
Examples
editwriteDump(toNumeric("123.45"));
writeDump(toNumeric("0110","bin"));//6
writeDump(toNumeric("000C","hex"));//12
writeDump(toNumeric("24","oct"));//30
See also
- Numbers
- Int()
- IsNumeric()
- Val()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)