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;

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004