ToNumeric()

Converts given value to a number

ToNumeric( value=any, radix=any );

Returns: Number

Argument Description
value
any, required

Value that should be converted to a numeric value

radix
any, optional

The base for conversion of the given value, default is 10

Supported values are:

  • 2-36
  • bin
  • oct
  • dec
  • hex

Examples

writeDump(toNumeric("123.45"));
writeDump(toNumeric("0110","bin"));//6
writeDump(toNumeric("000C","hex"));//12
writeDump(toNumeric("24","oct"));//30

See also