ONC+ Developer's Guide

Syntax Notes

The following are keywords and cannot be used as identifiers:

Only unsigned constants can be used as size specifications for arrays. If an identifier is used, it must have been declared previously as an unsigned constant in a const definition.

Constant and type identifiers within the scope of a specification are in the same namespace and must be declared uniquely within this scope.

Similarly, variable names must be unique within the scope of struct and union declarations. Nested struct and union declarations create new scopes.

The discriminant of a union must be of a type that evaluates to an integer. That is, it must be an int, an unsigned int, a bool, an enum type, or any typedef that evaluates to one of these. Also, the case values must be legal discriminant values. Finally, a case value cannot be specified more than once within the scope of a union declaration.