From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Representation clause of a discriminated record
Date: Tue, 2 Aug 2016 23:13:07 -0700
Date: 2016-08-02T23:13:07-07:00 [thread overview]
Message-ID: <nns21p$j1q$1@dont-email.me> (raw)
In-Reply-To: <677b076a-4cfb-4972-b5e5-d56c86e2179f@googlegroups.com>
On 08/02/2016 10:04 PM, David SAUVAGE wrote:
>
> What would be a valid representation clause for the following discriminated record ? (taken from the Ada wikibook [1])
>
> type Discriminated_Record (Size : Natural) is
> record
> A : String (1 .. Size);
> end record;
for Discriminated_Record use record
Size at 0 range 0 .. 31;
end record;
if Integer'Size = 32. You can't give a representation for A because you don't
know it's size.
--
Jeff Carter
"Mr. President, we must not allow a mine-shaft gap!"
Dr. Strangelove
33
next prev parent reply other threads:[~2016-08-03 6:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 5:04 Representation clause of a discriminated record David SAUVAGE
2016-08-03 6:13 ` Jeffrey R. Carter [this message]
2016-08-03 15:22 ` Per Sandberg
2016-08-03 16:43 ` david.sauvage
2016-08-03 16:46 ` David SAUVAGE
2016-08-04 21:23 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox