AT&T Home | AT&T Labs | Research
AT&T Labs, Inc. - Research

The Yoix® Scripting Language

Home | What's New | Grammar | Documentation | Download | License | YDAT | YWAIT | Byzgraf | FAQs
while grammar
 
Marks the start of a looping block whose looping condition must evaluate to a non-zero value for the looping to continue. The condition is tested each time the loop is entered. Naturally, either break or continue statements can be used in the body of the loop-block to further control execution flow. Its usage description can be summarized as follows:
Statement:
	while ( Expression ) Statement
 
 Example:   In the following example, a while loop is used to iterate over an array of available fonts.
import yoix.awt.*;
import yoix.stdio.*;

Array fl = getFontList();

puts("Available fonts are:");
while(fl@sizeof > 0) {
    printf("\t%s\n", *fl++);
}
Available fonts are:
        Dialog
        SansSerif
        Serif
        Monospaced
        DialogInput
 
 See Also:   for, reference, while

 

Yoix is a registered trademark of AT&T Intellectual Property.