Representation Clauses
With one exception, you must not use the representation clause for any types or objects you have declared to EQUEL and intend to use with the EQUEL runtime system. Any such clause will cause runtime errors. These clauses include the Ada statement:
for type_or_attribute use expression;
and the Ada pragma:
pragma pack(type_name);
The exception is that you can use a representation clause to specify internal values for enumerated literals. When you do so, however, you should not reference any enumerated literals of the modified enumerated type in embedded statements. The representation clause invalidates the effect of the pos attributes that the preprocessor generates. If the application context is one that requires the assignment from the enumerated type, then you should deposit the literal into a variable of the same enumerated type and assign that variable to Ingres. In all cases, do not precede the representation clause with the ## mark.
For example:
## type Opcode is (OPADD, OPSUB, OPMUL);
for Opcode use (OPADD => 1, OPSUB => 2,
OPMU, =>4);
...
opcode_var ;= OPSUB;
## append to codes (opcode = opcode_var);