packed enumerated types?

Peter N Lewis peter at stairways.com.au
Fri Mar 28 04:30:05 CET 2003


>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.

Mostly it just seems like a good place for better consistency.

On a related not, is it possible to define a set that fits inside a 
Byte?  Traditionally the text Style in Mac OS has been defined as 
something like

set of (bold,italic,underlined)

and fits inside a byte.  But of course the poor C folks can't do this 
so they just use a byte and do all that bit twiddling.  But it seems 
GPC requires 4 bytes for this, even if both the set and the subrange 
are packed.  Is that correct?  I presume there is no way to work 
around this (and no, I'm not asking for it as a feature, just double 
checking that it is not possible currently).

Thanks,
    Peter.

-- 
<http://www.interarchy.com/>  <http://download.interarchy.com/>




More information about the Gpc mailing list