comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <nobody@noplace.com>
Subject: Re: Enumeration representation
Date: Fri, 02 Jan 2004 13:58:59 GMT
Date: 2004-01-02T13:58:59+00:00	[thread overview]
Message-ID: <3FF57910.60406@noplace.com> (raw)
In-Reply-To: wcchdzf6p9b.fsf@shell01.TheWorld.com

We used to slap that on Ada83 code just to be sure we got what we wanted 
(usually because it was being communicated externally in some way). I 
don't think we ever encountered a compiler where the representation was 
otherwise, but because the standard didn't dictate that it was so, we 
played safe. Now that we're using Ada95, it is (as you observe) from the 
Department Of Redundancy Department and completely unnecessary. However, 
Our tools still generate this kind of code and old programmer's habbits 
die hard. People still do it. I wonder if it causes any harm by way of 
inefficiency in some respect?

MDC


Robert A Duff wrote:
> 
> RM-13.4(8) *requires* the internal codes to be 0, 1, 2...
> if no representation clause is given.
> So there's never a need to say "for Enum_Type use (0, 1, 2, 3);" --
> that's the default.  It is not implementation dependent.
> 
> And of course the position numbers always start at 0, no matter what
> the representation is.
> 
> - Bob


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "Face it ladies, its not the dress that makes you look fat.
     Its the FAT that makes you look fat."

         --  Al Bundy

======================================================================




  parent reply	other threads:[~2004-01-02 13:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-01 20:44 Enumeration representation Luke A. Guest
2004-01-01 21:45 ` Stephen Leake
2004-01-01 22:01   ` Luke A. Guest
2004-01-02  1:17     ` tmoran
2004-01-02  1:29     ` Stephen Leake
2004-01-02  3:10       ` Luke A. Guest
2004-01-02  2:46 ` Robert A Duff
2004-01-02  3:12   ` Luke A. Guest
2004-01-02 13:58   ` Marin David Condic [this message]
2004-01-02 21:39     ` Pat Rogers
2004-01-03 13:42       ` Marin David Condic
2004-01-03  1:53     ` Robert A Duff
2004-01-02 20:52   ` Randy Brukardt
2004-01-02 21:05     ` Luke A. Guest
  -- strict thread matches above, loose matches on Subject: below --
1999-09-10  0:00 Alex
1999-09-10  0:00 ` David C. Hoos, Sr.
1999-09-10  0:00   ` Robert Dewar
1999-09-10  0:00 ` Matthew Heaney
1999-09-10  0:00   ` Robert Dewar
1999-09-10  0:00 ` Keith Thompson
1999-09-11  0:00   ` Robert Dewar
1999-09-11  0:00     ` Keith Thompson
1999-09-12  0:00       ` Bryce Bardin
1999-09-13  0:00         ` Robert Dewar
1999-09-13  0:00           ` Keith Thompson
1999-09-13  0:00       ` Robert Dewar
1999-09-12  0:00         ` Keith Thompson
1999-09-13  0:00           ` Robert Dewar
1999-09-13  0:00             ` Ted Dennison
1999-09-13  0:00             ` Keith Thompson
1999-09-14  0:00               ` Robert Dewar
1999-09-13  0:00         ` Robert A Duff
1999-09-13  0:00           ` Robert Dewar
1999-09-10  0:00 ` Ted Dennison
1999-09-10  0:00   ` Robert Dewar
1999-09-13  0:00     ` Ted Dennison
1999-09-13  0:00 ` Alex
replies disabled

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