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

Statements

The executable code within a function definition consists of a sequence of statements and declarations. As discussed in Scope, declarations become effective at the place they appear. Statements are executed in sequence except as discussed below. In particular, the optional labels on some of the statements are used with break and continue to exit from or re-execute the labelled statement.

statements:
	(empty)
	statements declaration
	statements statement

statement:
	expression ;
	;
	{ statements }
	if (expression) statement
	if (expression) statement else statement
	labelopt while (expressionopt) statement
	labelopt do statement while (expressionopt) ;
	labelopt for (		expressionopt ; 
			expressionopt ;
			expressionopt) statement
	labelopt case expression { qual-statement-sequence }
	labelopt alt { qual-statement-sequence }
	break identifieropt;
	continue identifieropt;
	return expressionopt;
	spawn term (expression-listopt);
	exit ;

label:
	identifier:



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

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