Function Reference

Number

Returns the numeric representation of an expression.

Number ( expression )

 

Parameters

expression An expression to convert into a number.

 

Return Value

Returns a number.

 

Remarks

A string beginning with letters has a numeric value of zero. A string beginning with digits has non-numeric characters stripped.

 

Related

Int, String

 

Example


$w = Number(1+2+10) ;returns 13
$x = Number("3.14") ;returns 3.14
$y = Number("24/7") ;returns 24
$z = Number("tmp3") ;returns 0