From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Record Aggregate Bug
Date: 1996/06/21
Date: 1996-06-21T00:00:00+00:00 [thread overview]
Message-ID: <dewar.835396204@schonberg> (raw)
In article <mcriley.835361851@BIX.com>, mcriley on BIX <mcriley@BIX.com> wrote:
type Task_Record_Type is
record
Originator : String (1 .. 20);
Header_Dtg : String (1 .. 12);
end record;
Task_Record : Task_Record_Type := (others => (others => ' '));"
This is perfectly fine (T.E.D. worried about the subtypes being different,
but the relevant RM quote talks about same types, not same subtypes).
These declarations compile and execute fine on GNAT.
I don't however like this coding style very much, it is definitely
obscure, I think others is better avoided in record aggregates, and
would far prefer to see
Task_Record := Task_Record_Type := (Originator => (others => ' '),
Header_Dtg => (others => ' '));
Much clearer (and presumably as a bonus will work past the bug on the
other unnamed compiler :-)
reply other threads:[~1996-06-21 0:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox