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() Return a boolean value indicating whether floating-point numbers are supported.
isFloat() Return a boolean value indicating whether it is possible to convert a value to a floating-point number using the parseFloat() function.
isInt() Return a boolean value indicating whether it is possible to convert a value to an integer using the parseInt() function.
max(x,y) Return the highest value between x and y.
maxInt() Return the largest possible integer value.
min(x,y) Return the minimum value between x and y.
minInt() Return the smallest possible integer value.
parseFloat() Return a floating-point number defined by a string.
parseInt() Return an integer defined by a string.
random(x) Return a random integer between 0 and x.
seed() Initialize a random number generator with a number and return an empty string.

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