[Contents]
[Prev] [Next] [Limbo Basics] [Limbo Programming] [Language Definition]

The for Statement

The for statement has the form:

labelopt for (		expression-1opt; 
		expression-2opt; 
		expression-3opt) statement

It is equivalent to:

expression-1;
while (expression-2) {
	statement
	expression-3;
}

in the absence of continue or break statements. Thus, the first expression is an initialization, the second a test for starting and continuing the loop, and the third a re-initialization for subsequent travels around the loop.



[Contents]
[Prev] [Next] [Limbo Basics] [Limbo Programming] [Language Definition]

Copyright © 1998, Lucent Technologies, Inc. All rights reserved.