ParseNumber

Parses the string argument as a numeric value.

ParseNumber( number [, radix ] )

Returns: Number

Argument Description
number
string, required

the String containing the numeric representation to be parsed

radix
string, optional

the radix to be used while parsing (bin,oct,dec,hex)

Examples

number = "1000";
  echo(ParseNumber(number, "dec")); // 1000
  echo(ParseNumber(number, "bin")); // 8
  echo(ParseNumber(number, "oct")); // 512
  echo(ParseNumber(number, "hex")); // 4096

See also