Пётр Косаревский wrote:
Yes, you do. :)
Nevertheless
some_type = record
case Something : byte of
1: (x,y: word);
2: (z: longword);
end;
Thank you, Jonas and Vincent, but I was vague: what I want is blockread'ing, so
I have to use
record
Something: byte;
case byte of
1: (x,y: word);
2: (z: longword);
end;
No, AFAIK you don't have to, it's the same, just a different syntax.
Your "Something" byte discrimant will be there. Or where else do you
think it is stored within the structure?
Probably you should used a "packed record", though. And it's in no way
portable, of course.
Vinzent.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal