From: Kilgallen@SpamCop.net (Larry Kilgallen)
Subject: Re: Discriminants constraining unconstrained array types
Date: 20 Oct 2001 15:55:25 -0500
Date: 2001-10-20T15:55:25-05:00 [thread overview]
Message-ID: <hniaGoqA6Kwe@eisner.encompasserve.org> (raw)
In-Reply-To: 3BD1B6F3.F90883D7@worldnet.att.net
In article <3BD1B6F3.F90883D7@worldnet.att.net>, James Rogers <jimmaureenrogers@worldnet.att.net> writes:
> type Unconstrained_Type is array(Positive range <>) of Integer;
>
> type Inadvised_Record_Type (Max : Positive) is record
> Buffer : Unconstrained_Type(1..Max);
> end record;
>
> The compiler must identify the size of Inadvised_Record_Type.
> The problem arises because the array constraints are determined
> at run-time and not at compile-time. The only vaguely reasonable
> option for the compiler is to set Buffer'Size equal to
> Positive'Last * Integer'Size.
Why is that the only reasonable option ?
next prev parent reply other threads:[~2001-10-20 20:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-20 15:49 Discriminants constraining unconstrained array types Matthew Woodcraft
2001-10-20 17:39 ` James Rogers
2001-10-20 19:04 ` Damien Carbonne
2001-10-20 20:55 ` Larry Kilgallen [this message]
2001-10-20 21:43 ` Jeffrey 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