Keith Rollin wrote:
> On Dec 20, 2004, at 11:45 PM, Logan Shaw wrote:
>
>> Evan Ovadia (Verdagon) wrote:
>>
>>> struct MyColorType
>>> {
>>> UInt8 index, r, g, b;
>>> };
>> Anyway, the definition for MyColorType that you gave is definitely
>> *NOT* identical to RGBColorType. RGBColorType is defined like this:
>>
>> typedef struct RGBColorType
>> {
>> UInt8 index;
>> UInt8 r;
>> UInt8 g;
>> UInt8 b;
>> } RGBColorType;
>>
>> Note that there is an extra field in there.
> I've been looking at the definitions for MyColorType and RGBColorType,
> and don't see any differences (other than all the fields being declared
> on the same line in MyColorType).
Oops, I wrote that late at night and managed to miss that the "index"
field *did* exist in MyColorType! (I guess my own mental not-quite-C
parser expects things to be on separate lines if they are different
types semantically, even if they are the same type syntactically.
So my brain parsed "index" out of existence.)
- Logan
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/