comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Record representation
Date: Wed, 09 Jun 2004 17:44:08 GMT
Date: 2004-06-09T17:44:08+00:00	[thread overview]
Message-ID: <H%Hxc.2242$2i5.2089@attbi_s52> (raw)
In-Reply-To: 40c7407c$1_1@baen1673807.greenlnk.net

>>   type A is record
>>   type AA is array (Index) of A;
>>   for AA'Size use A'Size * Index'Last;  -- Not allowed!!!!!

>Ok, the example was too simple - imagine a record with components that
>are arrays, other record etc.
  You shouldn't be trying to specify a particular size:  you may get it
wrong (perhaps due to later changes, such as here if Index'First /= 1) and
especially since the compiler may not be capable of generating code to do
it (the A'size=31 previously mentioned).  Pragmas Pack and Component_Size
ought to be able to get the compiler to generate any code it is capable
of, in particular to make AA take as little storage as possible.

------------------
original American ideology:
"War is in fact the true nurse of executive aggrandizement.  In war a
physical force is created, and it is the executive will to direct it.  In
war the public treasuries are to be unlocked, and it is the executive hand
which is to dispense them, In war the honors and emoluments of office are
to be multiplied and it is the executive patronage under which they are to
be employed.  It is in war finally that laurels are to be gathered, and it
is the executive brow they are to encircle.  The strongest passions and
the most dangerous weakness of the human breast - ambition, avarice,
vanity, the honorable or venial love of fame - are all in conspiracy
against the desire and duty of peace."  James Madison



  reply	other threads:[~2004-06-09 17:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-09  9:14 Record representation Martin Dowie
2004-06-09 11:38 ` Martin Krischik
2004-06-09 14:11   ` Martin Dowie
2004-06-09 15:30 ` Mark H Johnson
2004-06-09 16:58   ` Martin Dowie
2004-06-09 17:44     ` tmoran [this message]
2004-06-09 20:08     ` Mark H Johnson
2004-06-09 21:12       ` Martin Dowie
2004-06-09 21:14       ` Martin Dowie
2004-06-10  0:38 ` Stephen Leake
2004-06-10  6:13   ` Randy Brukardt
2004-06-10  6:10 ` Randy Brukardt
2004-06-15  7:37   ` Martin Dowie
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox