From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Re: array size
Date: 1999/12/10
Date: 1999-12-10T00:00:00+00:00 [thread overview]
Message-ID: <3851d15b_1@news1.prserv.net> (raw)
In-Reply-To: 101219991605504828%hopperj@macconnect.com
In article <101219991605504828%hopperj@macconnect.com> , "James E.
Hopper" <hopperj@macconnect.com> wrote:
> type Preset_Array_Type is array ( Preset_Type ) of Frequency_Type;
> pragma pack (Preset_Array_Type); -- RAD SOLARIS PORT
> for Preset_Array_Type'Size use 6 * Frequency_Type'Size;
Always do this for composite types:
Preset_Array_Type_Size : constant := 6 * Frequency_Type'Size;
for Preset_Array_Type'Size use Preset_Array_Type_Size;
> -- We tried the following just for giggles but interestingly,
> -- the compiler says that Preset_Array_Type'Size isn't static!!
> -- for Day_Array_Type'Size use 7 * Preset_Array_Type'Size;
It said that because composite types (including arrays) are always
nonstatic; see RM95 4.9.
The solution is easy enough:
for Day_Array_Type'Size use 7 * Preset_Array_Type_Size;
or better
Day_Array_Type_Size : constant := 7 * Preset_Array_Type_Size;
for Day_Array_Type'Size use Day_Array_Type_Size;
--
Time and again the nation's courts have ruled that creationism, as a
religious dogma, cannot be taught in science classes. Now, creationists
are advancing a new tactic: eliminating the teaching of evolution and
other sciences that complement evolution, such as geology, paleontology,
and biological anthropology. By doing so, they are not only endangering
church-state separation but also seriously jeopardizing the science
education of future generations.
http://www.campusfreethought.org/sos/
next prev parent reply other threads:[~1999-12-10 0:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-10 0:00 array size James E. Hopper
1999-12-10 0:00 ` Matthew Heaney [this message]
1999-12-11 0:00 ` Robert Dewar
1999-12-11 0:00 ` James E. Hopper
1999-12-12 0:00 ` Matthew Heaney
1999-12-11 0:00 ` Matthew Heaney
1999-12-13 0:00 ` Robert A Duff
1999-12-11 0:00 ` Robert A Duff
1999-12-11 0:00 ` Matthew Heaney
1999-12-11 0:00 ` James E. Hopper
1999-12-11 0:00 ` DuckE
1999-12-11 0:00 ` James E. Hopper
1999-12-11 0:00 ` DuckE
1999-12-12 0:00 ` James E. Hopper
1999-12-12 0:00 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox