WMLScript Developer's Guide

[Cover] [Previous Section] [Next Section] [Index]

Current chapter: Chapter 6 - Statements
Section 37 out of 57 total sections , Section 11 out of 11 sections in this chapter


Return Statements

Use a return statement inside the body of a function to specify the function return value. If you do not specify a return statement or none of the function return statements is executed, the function returns an empty string.

The following is an example of a return statement:

function square (x) {  
    if (!(Lang.isFloat(x))) return invalid;  
    return x * x;  


[Cover] [Previous Section] [Next Section] [Index]


Part Number DKDS-41-002, UP.SDK Release 4.1, December 2000

Copyright © 1994-2000 Openwave Systems Inc. All rights reserved.
Please send comments and questions to sdk-doc-comments@openwave.com.