WMLScript » Lang » Lang.minInt

Syntax:
Lang.minInt

Returns the minimum recognized integer value.

The Lang.minInt function returns the largest negative integer number recognized by the browser.

The companion Lang.maxInt function returns the largest positive integer number recognized by the browser.

Typical maximum and minimum values are:

Max = 2147483647
Min = -2147483647

Neither function takes a parameter.

Examples

Code:
<?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>
   minInt example
   </p>
   <do type="accept">
      <go href="MinIntxample.wmls#findminint( )" />
   </do>
</card>

<card id="card2">
<p>
   max = $(maxnum)
   <br />
   min = $(minnum)
</p>
</card>

</wml>
Explanation:

Code for MinIntExample.wmls

Language(s): WML
Code:
extern function findminint( )
{
   var maxresult = Lang.maxInt(str);
   var minresult = Lang.minInt(str);
   WMLBrowser.setVar("maxnum", maxresult);
   WMLBrowser.setVar("minnum", minresult);
   WMLBrowser.go("MinIntExample.wml#card2");
};
Explanation:

Code for MinIntExample.wmls

Language(s): WML

See Also: