Connected: An Internet Encyclopedia
RFC 1832 - 5.4 Syntax Notes

Top: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1832
Up: 5. THE XDR LANGUAGE SPECIFICATION
Prev: 5.3 Syntax Information
Next: 6. AN EXAMPLE OF AN XDR DATA DESCRIPTION

### 5.4 Syntax Notes

1. The following are keywords and cannot be used as identifiers: "bool", "case", "const", "default", "double", "quadruple", "enum", "float", "hyper", "opaque", "string", "struct", "switch", "typedef", "union", "unsigned" and "void".

2. Only unsigned constants may 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.

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

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

5. The discriminant of a union must be of a type that evaluates to an integer. That is, "int", "unsigned int", "bool", an enumerated type or any typedefed type that evaluates to one of these is legal. Also, the case values must be one of the legal values of the discriminant. Finally, a case value may not be specified more than once within the scope of a union declaration.

Next: 6. AN EXAMPLE OF AN XDR DATA DESCRIPTION

Connected: An Internet Encyclopedia
RFC 1832 - 5.4 Syntax Notes