From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: Exactly the prblem, how do we make a known constant value static?
Date: Sat, 20 Oct 2001 02:53:38 GMT
Date: 2001-10-20T02:53:38+00:00 [thread overview]
Message-ID: <3BD0E769.22FC05DC@acm.org> (raw)
In-Reply-To: 9qp9ta$1pc$1@newstoo.ericsson.se
Petter Fryklund wrote:
>
> Sure, my mistake. It would have been correct if we had been working on
> bytes, but still, how do we make a rep spec?
Since the array's size depends on a generic parameter, there is no way
to obtain a static size for the array to use in a rep spec. The only way
is to specify the components that come before the array, pack the
record, and hope the compiler positions everything where you need it.
>
> My_Array_Length : constant Integer := Integer ((Indices'Last -
> Indices'First + 1) * 4 * 8);
If Integer'Size is 32, this is the same as My_Array'Size.
--
Jeff Carter
"English bed-wetting types."
Monty Python & the Holy Grail
next prev parent reply other threads:[~2001-10-20 2:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-17 15:18 unconstrainted arrays Alfred Hilscher
2001-10-17 15:35 ` Lutz Donnerhacke
2001-10-17 16:28 ` Alfred Hilscher
2001-10-18 7:42 ` Lutz Donnerhacke
2001-10-18 11:03 ` Rep spec still not possible Petter Fryklund
2001-10-18 12:44 ` Lutz Donnerhacke
2001-10-18 17:10 ` Jeffrey Carter
2001-10-19 13:52 ` Exactly the prblem, how do we make a known constant value static? Petter Fryklund
2001-10-20 0:04 ` James Rogers
2001-10-20 2:53 ` Jeffrey Carter [this message]
2001-10-22 8:11 ` We still don't know how to make a " Petter Fryklund
2001-10-17 16:09 ` unconstrainted arrays Claude SIMON
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox