WMLScript Lang Library

The Lang function library includes functions for absolute value calculation, data type operations, and random number generation.

WMLScript Lang Library Functions

Function Description
abort() Abort WMLScript and return a message to the caller of this script.
abs(x) Return the absolute value of a number.
characterSet() Return the character set supported by the WMLScript interpreter.
exit() Exit WMLScript and return a message to the caller of this script.
float() Returns a boolean value indicating whether floating-point numbers are supported.
isFloat() Returns a boolean value indicating whether it is possible to convert a value to a floating-point number through the parseFloat() function.
isInt() Returns a boolean value indicating whether it is possible to convert a value to an integer through the parseInt() function.
max(x,y) Returns the maximum value between x and y.
maxInt() Returns the possible maximum integer value.
min(x,y) Returns the minimum value between x and y.
minInt() Returns the possible minimum integer value.
parseFloat() Returns a floating-point number defined by a string.
parseInt() Returns an integer defined by a string.
random(x) Returns a random integer between 0 and x.
seed() Initialize a random number generator with a number and return an empty string.

Note:The name of the Lang function library is easy to misunderstand and should be named as Math function library or similar names. However, it is called Lang function library because the functions contained in this library are closely related to the core of the WMLScript language.