comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@ni.net (Matthew Heaney)
Subject: Re: Ada 95 Numerics questions for the experts
Date: 1997/09/08
Date: 1997-09-08T00:00:00+00:00	[thread overview]
Message-ID: <mheaney-ya023680000809972047000001@news.ni.net> (raw)
In-Reply-To: EG7FIq.Ivw@world.std.com


In article <EG7FIq.Ivw@world.std.com>, bobduff@world.std.com (Robert A
Duff) wrote:

>>I assumed that by specifying
>>the component size to be 3, that that meant the component size should be 3. 
>>How naive of me!
>
>Well, it should, 

I'm confused by this answer.  What does you mean when you say that the
component size "should" be 3?  Is it 3, or isn't it?  Assuming conformance
to Annex C, can a compiler legally compile the declaration (that doesn't
have a pragma Pack), and _not_ give the array a component size of 3?

>but what should 'Component_Size be for an array of
>3-bit components, where the implementation puts 10 of them in each word,
>and leaves a gap of 2-bits at the end of each word?  (I'm assuming
>32-bit words, here.)
>
>If there's a "gap" of 1 bit between each 3-bit component, then I don't
>think that should be called a "gap" at all -- we should call that
>situation "4-bit components".

Again, I am confused by your answer.  What does it mean to say that "I
don't think" it should be called a gap, or we "should" call the situtation
4-bit components?  Doesn't the RM define the meaning of the term "gap"? 
What was the intent of the RM, if it doesn't define gap?

Yes or no: According to the RM, is dense, no-gaps-between-the-components
packing _implied_ by the specification of a Component_Size clause?  Or is
pragma Pack always required as part a declaration?

Robert says that both a pragma Pack and a component size clause are
required to be given in order to guarantee that component size.  Is this
the intent of the RM?  Or is he reading the RM too literally?  (I should
rephrase that last question: Is there an error in the RM, such that its
statements about also requiring a pragma Pack, are ambiguous?)

--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271




  reply	other threads:[~1997-09-08  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3401C14B.480@gsfc.nasa.gov>
1997-08-25  0:00 ` Ada 95 Numerics questions for the experts Robert Dewar
     [not found] ` <dewar.872560585@merv>
     [not found]   ` <jcreem-2608970711210001@ljd155.sanders.lockheed.com>
     [not found]     ` <dewar.872630607@merv>
     [not found]       ` <jeffrey.m.creem-2708970802350001@ljd155.sanders.lockheed.com>
1997-08-27  0:00         ` Robert Dewar
     [not found]           ` <jeffrey.m.creem-2808970708260001@ljd155.sanders.lockheed.com>
1997-08-28  0:00             ` Robert Dewar
1997-08-27  0:00         ` David C. Hoos, Sr.
1997-08-27  0:00           ` Robert Dewar
1997-08-27  0:00           ` Jeff Creem
1997-08-28  0:00             ` Robert Dewar
1997-08-28  0:00               ` Jeff Creem
1997-08-29  0:00               ` Tucker Taft
1997-08-30  0:00                 ` Robert A Duff
1997-08-31  0:00                 ` Tom Moran
1997-09-01  0:00                 ` Robert Dewar
1997-09-02  0:00                   ` Robert A Duff
1997-09-02  0:00                   ` Fergus Henderson
     [not found]                   ` <mheaney-ya023680000209972104030001@news.ni.net>
1997-09-05  0:00                     ` Robert Dewar
1997-09-05  0:00                       ` Matthew Heaney
1997-09-08  0:00                         ` Robert A Duff
1997-09-08  0:00                           ` Matthew Heaney [this message]
1997-09-09  0:00                             ` Robert A Duff
     [not found]                     ` <EFxt94.F5F@world.std.com>
1997-09-06  0:00                       ` Robert Dewar
1997-09-08  0:00                         ` Robert A Duff
1997-09-08  0:00                           ` Matthew Heaney
1997-09-09  0:00                             ` Robert A Duff
1997-09-01  0:00                 ` Robert Dewar
1997-08-30  0:00         ` Robert A Duff
replies disabled

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