Using WMLScript Functions

There are three types of WMLScript functions: local functions, external functions, and library functions. Which one you use will depend upon the requirement(s) of your particular WAP application. When creating WMLScript functions, bear the following in mind:

  • You cannot nest functions.

  • Each function name must be unique within each file.

  • Make sure you pass the exact number of arguments into the function that it expects.

  • Variables can only be accessed in the same WMLScript function in which they are declared. (There are no global variables within a WMLScript file.)

Local Functions

If you reference a function from within another function that is defined in the same WMLScript file, the referenced function is a local function. ...

Get WAP Development with WML and WMLScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.