WMLScript Developer's Guide

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

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


Break Statements

A break statement terminates the current while or for loop and continues program execution at the statement following the terminated loop. Using a break statement outside a while or a for loop generates an error.

The following is an example of a break statement.

function testBreak(x) {  
    var index = 0;  
    while (index < 6) {  
        if (index == 3) break;  
        index ++  
    }  
    return index*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.