Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

Enum type equivalence

The following example illustrates the translation of the simple enum __device_t from the C header file stdio.h:

Figure 57. Sample enum type equivalence
     typedef enum {
        __disk       =  0,
        __terminal   =  1,
        __printer    =  2,
        __tape       =  3,
        __tdq        =  5,
        __dummy      =  6,
        __memory     =  8,
        __hfs        =  9,
        __hiperspace = 10
     } __device_t;

     define ordinal __device_t (
             __disk       value(0)
           , __terminal   value(1)
           , __printer    value(2)
           , __tape       value(3)
           , __tdq        value(4)
           , __dummy      value(5)
           , __memory     value(8)
           , __hfs        value(9)
           , __hiperspace value(10)
        );

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)