From: John Perry <john.perry@usm.edu>
Subject: Advent of Code Day 7
Date: Mon, 7 Dec 2020 15:03:29 -0800 (PST) [thread overview]
Message-ID: <df3d282a-ff8c-4fd7-befc-a6ca683215e1n@googlegroups.com> (raw)
When doing today's exercise, I encountered an issue where I wanted to initialize only some fields of a record, with the other fields having a default initialization. In particular:
type Bag_Entry is record
Description: Bag_Description := " ";
Quantity: Positive;
end record;
Entry: Bag_Entry := ( Quantity => 10 );
However, GNAT says this is invalid because I didn't specify Bag_Description. I looked in the ARM but didn't see anyplace that implies that; did I miss it? Is there a reason that Description can't be initialized automatically according to the rules above?
john perry
next reply other threads:[~2020-12-07 23:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-07 23:03 John Perry [this message]
2020-12-07 23:44 ` Advent of Code Day 7 Randy Brukardt
2020-12-07 23:49 ` John Perry
2020-12-08 11:25 ` Jeffrey R. Carter
2020-12-08 16:55 ` John Perry
2020-12-08 23:25 ` Jeffrey R. Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox