WMLScript Developer's Guide

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

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


While Statements

A while statement creates a loop that evaluates an expression and, if the expression evaluates to true, executes a statement. The loop repeats as long as the specified condition is true.

The following is an example of a while statement:

var counter = 0;  
var total = 0;  
while (counter < 3) {  
    counter++;  
    total += c;  
}  

[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.