comp.lang.ada
 help / color / mirror / Atom feed
From: "Beard, Frank" <beardf@spawar.navy.mil>
To: "'comp.lang.ada@ada.eu.org'" <comp.lang.ada@ada.eu.org>
Subject: RE: accesing internal codes used for an enumeration
Date: Thu, 10 May 2001 14:45:44 -0400
Date: 2001-05-10T14:45:44-04:00	[thread overview]
Message-ID: <mailman.989520431.10491.comp.lang.ada@ada.eu.org> (raw)

> For an unchecked conversion to work, the sizes have to match
> exactly!

Not on DEC Ada (or Compaq Ada, whatever it's called).

But, that's what I meant by "(defined large enough to hold
the all the possible numbers)".  Re-reading it I can see
that it's unclear.  I tend to be terse, but I meant the
size of the integer (8, 16, 32, etc.) has to be big enough
for the values used in the underlying representation.  And
yes they have to be the same size (for portability).  I
was taking that as a given (or implied), but thanks for
making it clearer.

Frank

-----Original Message-----
From: Jacob Sparre Andersen [mailto:sparre@nbi.dk]
Sent: Tuesday, May 08, 2001 1:57 AM
To: comp.lang.ada@ada.eu.org
Subject: Re: accesing internal codes used for an enumeration


Frank:

> I'm not sure where it is, other than the description of enumerated
> types.  Since enumerated types map to an underlying integer
> representation, your Uncheck_Conversion will be from the enumerated
> type to an integer type (defined large enough to hold the all the
> possible numbers).

For an unchecked conversion to work, the sizes have to match
exactly!

Jacob
-- 
Warning: Dates in calendars are closer than they appear.
_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada




             reply	other threads:[~2001-05-10 18:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-10 18:45 Beard, Frank [this message]
     [not found] <Pine.LNX.4.21.0105071543050.9145-100000@lux38>
2001-05-07 21:18 ` accesing internal codes used for an enumeration Marius Amado Alves
  -- strict thread matches above, loose matches on Subject: below --
2001-05-07 18:53 Beard, Frank
2001-05-08  5:56 ` Jacob Sparre Andersen
2001-05-07 16:03 Marius Amado Alves
2001-05-07 15:33 ` Jacob Sparre Andersen
2001-05-07 15:54 ` Ted Dennison
2001-05-08  3:51 ` Marc A. Criley
replies disabled

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