On Wed, 4 Feb 2004, Francesco Bonomi wrote:
These are the declarations I have (stripped down)
TYPE
ITEN = packed RECORD KEY :PACKED ARRAY [1..MAX] OF CHAR; PUNT:integer; END;
ND = packed RECORD POS : integer; IDX : packed ARRAY [1..ONDM2] OF ITEN; END;
VAR DATA : ND;
I see two problems: 1. "packed array [ ] of char" is not a string. there are operations you can use with strings that don't work on a packed array. 2. "packed record". Most cpu's handle data on four byte boundrys. The compiler "knows" this so if a data item is not a multiple of 4 bytes and it is not a packed record the item gets padded to fit. While you can create software to handle data items that don't start on a 4 byte boundry, memory and storage is so cheap these days you really wouldn't want to.
If it were me I would: change "array[ ] of char" to a string drop the use of "packed" write a separate program to do a one time conversion of all your old data to the new format.
Hope this helps, Russ