On Sun, 16 Nov 1997 18:00:03 +0100 (MET), Peter Gerwinski wrote:
- Recent beta versions of GPC reserve one additional byte in each string for appending a `chr ( 0 )' character for sake of compatibility to C
only byte 12 will have random bits when the length of the string is `2'. (That's why the size of the string is 12, not 11.)
- which is not yet used. In future versions, byte 11 will be zero, and
I've been playing around with this example... for some reason it interests me. :) Just wondering, but do you realize that if you define rec as a packed record, you apparantly lose this additional byte. This doesn't really hurt much as the chr(0) isn't used yet, but I don't know if it will cause problems down the road. E.g. if you put 'ABC' into the string instead of 'AB' you see the bits for the letters but there is no 12th random bits byte, and sizeof(x.rec) yields 15. Should it preserve the byte even when the string is part of a packed record?
-Kevin -- Kevin A. Foss --- kfoss@mint.net --