|
|
RPC/XDR enumerations have the same syntax as C enumerations.
enum-definition: enum enum-ident { enum-value-list }This is a short example of an RCP/XDR enum:enum-value-list: enum-value enum-value , enum-value-list
enum-value: enum-value-ident enum-value-ident = value
enum colortype { RED = 0, GREEN = 1, BLUE = 2 };This gets compiled to the C enum:
enum colortype { RED = 0, GREEN = 1, BLUE = 2, }; typedef enum colortype colortype;