next up previous contents index
Next: Arrays Up: Data types Previous: Data types   Contents   Index


Enumerations

Since SIDL enumerations map to C enumerations, their use is fairly straight-forward. The appropriate header file must be included. The naming convention for enumerations is enums followed by the specified enumeration type and enumeration value name, where an underscore is used to separate each part. For example, a variable can be assigned the blue constant for the color enumeration of the sample in Subsection 5.3 as follows$:$


#include "enums_color.h"

/* ...deleted lines... */
enum enums_color__enum myColor = enums_color_blue;





babel-1.0.0
users_guide Last Modified 2006-07-21

http://www.llnl.gov/CASC/components
components@llnl.gov