Copyright © 1996, 1997 Lucent Technologies Inc. All rights reserved.

6.2 Constant declarations

The con declaration


identifier-list : con expression ;
declares a name (or names) for constants. The expression must be constant (see §8.5). After the declaration, each identifier in the list may be used anywhere a constant of the appropriate type is needed; the type is taken from the type of the constant. For example, after
	Seven: con 3+4;
the name Seven is exactly the same as the constant 7.

The identifier iota has a special meaning in the expression in a con declaration. It is equivalent to the integer constant 0 when evaluating the expression for the first (leftmost) identifier declared, 1 for the second, and so on numerically. For example, the declaration

	M0, M1, M2, M3, M4: con (1<<iota);
declares several constants M0 through M4 with the values 1, 2, 4, 8, 16 respectively.

The identifier iota is not reserved except inside the expression of the con declaration.

05/Jun/97