On 14 Dec 2003 at 17:32, Waldek Hebisch wrote: [...]
I basically challenge your need to have a packed record. You can copy the whole record to an unpacked one (tedious if you have many fields but may be less work then previous approach) and back when needed.
If my wild guess is correct you need packed record to match file header.
Yes.
Then the best way may be to copy it to unpacked record on reading file and copy to packed one on writing.
Packing is needed for both reading and writing.
Finally, if you really want quick&dirty solution the following seem to do what you want:
program packer; uses Strings; Type {$pack-struct, maximum-field-alignment 8} foo = record sig : array [ 0..3 ] OF Char; end; {$no-pack-struct, maximum-field-alignment 0}
This solves the problem, and is less tedious to do.
Thanks.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/