Openlot Systems

10.2 Which functions are available in the WMLscript Lang library?

The following functions are available in the Lang library. Note that this is meant as a basic introduction and a quick reference. The authoritative source on WMLscript is WAPforum and the latest approved WMLscript reference is available here.

The functions in this section are accessed by Lang.functionName

abs(number) returns the absolute value of number

min(number1,number2) returns smallest of number1 and number2, or number1 if equal

min(number1,number2) returns largest of number1 and number2, or number1 if equal

parseInt(string) returns the integer value of string

parseFloat(string) returns the floating point value of string

isInt(string) returns true if string can be converted to an integer

isFloat(string) returns true if string can be converted to a floating point value

maxInt() returns the maximum supported integer value

minInt() returns the minimum supported integer value

float() returns true of floating point values are supported

exit(any) exits WMLscript and returns any to the caller

abort(errorDescription) aborts WMLscript and returns errorDescription to the caller

random(integer) returns a random integer between 0 and integer

seed(integer) seeds the random number generator with the value of integer

charSet() returns an integer representing the MIBenum of the character set supported by the WMLscript interpreter.

[ Main ]   [ 10 - WMLscript in detail ]