A declare-expression is an assignment that also declares the identifier on its left:
declare-expression: lvalue := expressionHere 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.