SynopsisStructure used to store all possible data types. Prototype#include "uemf.h" typedef struct { union { char bool; char byteint; short shortint; char percent; long integer; long hex; long octal; long big[2]; double floating; char_t *string; char *bytes; char_t *errmsg; void *symbol; } value; value_type_t type; unsigned int valid; unsigned int allocated; /* String was balloced */ } value_t; typedef enum { undefined = 0, byteint = 1, shortint = 2, integer = 3, hex = 4, percent = 5, octal = 6, big = 7, bool = 8, floating = 9, string = 10, bytes = 11, symbol = 12, errmsg = 13 } value_type_t; DescriptionThe value_t type is used heavily in the GoAhead EMF database API. Example/********************************************/ /* * Initialize a boolean value. */ value_t valueBool(int value) { value_t v = VALUE_VALID; v.type = bool; v.value.bool = (char) value; return v; } Stability ClassificationStable. See Also |