From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,MSGID_SHORT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 3 Jun 93 14:44:34 GMT From: jeffe@midway.uchicago.edu (Jeff Etrick) Subject: Representation clauses Message-ID: <257@sphinx.CSS.GOV> List-Id: Dear Netters, I have inherited a program that has been around for a while and the users have a fair number of files generated from it. With the recent upgrade of my compiler the binary output files are no longer compatible. In looking over the code I have noticed the former programmers did not use any representation clauses for their output records. I have since been working on adding these to the current system. My problem is I have a variant record I see no way of putting a representation clause on. subtype Small_Natural is NATURAL range 0..300; type String_Record (Max_Length : Small_Natural := Small_Natural'Last) is record Length : Small_Natural := 0; Name : String(1..Max_Length) := (others => ' '); end record; type Catalog is record File_Name : String_Record; File_Description : String_Record; end record; Since I have been going in and changing things anyway my question is what is the best way to change the above so I am not bit again due to version or a compiler change? One idea I was thinking about was writing an Integer(the length) followed by a fixed length string, Internally the code would still use the variant records with only the reading and writing of file routines changing. Thanks for any advice, Jeff jeffe@osiris.css.gov