Determines if floating-point numeration is supported.
The
Lang.float function returns a boolean value that indicates
whether the browser supports floating-point numeration. A true
signifies that floating-point is supported. A false signifies
that it is not supported.
If the browser does
not support floating-point arithmetic operations, then the browser will
not recognize the Float Library, nor any of the member
functions. In this case, each member function will return an
invalid.
The Lang.isFloat
function can be used to determine if a value can be converted to a
floating-point number using the Lang.parseFloat function.
This function does not take a parameter.
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC
"-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1">
<p>
float
example
</p>
<do type="accept">
<go
href="FloatExample.wmls#findfloat()" />
</do>
</card>
<card id="card2">
<p>
floating-point = $(floattest)
</p>
</card>
</wml>
Code for FloatExample.wml
extern function
findfloat()
{
var result = Lang.float( );
WMLBrowser.setVar("floattest", result);
WMLBrowser.go("FloatExample.wml#card2");
};
Code for FloatExample.wmls