Peter N Lewis wrote:
I see that I can pack a subrange to make it fit into a byte, but it appears I cannot pack an enumerated type directly.
That is:
TYPE Month = packed 1..12;
works ok, but
TYPE Pref = packed (No, Yes);
does not.
I can do:
TYPE PrefX = (No, Yes); Pref = packed No..Yes;
Is there any reason that enumerated types could not be packed directly like subranges?
Packed subranges are a GPC extension not found in any other dialect or standard (AFAIK). So far, there apparently hasn't been a need for packed enums. I suppose they'd be rather easy to implement, but I'd have to check in detail if needed.
Frank