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

Declare expressions

A declare-expression is an assignment that also declares the identifier on its left:

declare-expression:
	lvalue := expression

Here a single identifier is declared as having the type of the expression, and initialized with the expression's value. When a parenthesized list of lvalues is given, the expression must be a tuple or an adt, and the individual identifiers in the list are declared and initialized with the members of the tuple, or the data members of the adt.

The value and type of a declare-expression are the same as those of the expression.



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

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