From: jeffe@midway.uchicago.edu (Jeff Etrick)
Subject: Representation clauses
Date: 3 Jun 93 14:44:34 GMT [thread overview]
Message-ID: <257@sphinx.CSS.GOV> (raw)
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
next reply other threads:[~1993-06-03 14:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-06-03 14:44 Jeff Etrick [this message]
-- strict thread matches above, loose matches on Subject: below --
1993-06-03 20:24 Representation clauses Mark A Biggar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox