DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Programming with Remote Procedure Calls (RPC)

Enumerations

RPC/XDR enumerations have the same syntax as C enumerations.

   enum-definition:
   	enum enum-ident {
   		enum-value-list
   	}
   

enum-value-list: enum-value enum-value , enum-value-list

enum-value: enum-value-ident enum-value-ident = value

This is a short example of an RCP/XDR enum:
   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;

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005