From: Wes Groleau <wwgrol@pseserv3.fw.hac.com>
Subject: Re: Ada Enumerations
Date: 1997/12/18
Date: 1997-12-18T00:00:00+00:00 [thread overview]
Message-ID: <34996F4F.6D74@pseserv3.fw.hac.com> (raw)
In-Reply-To: 34873053.15FB@hso.link.com
> > I must say I don't see so much of a problem with Unchecked_Conversion for
> > replacing Enum_Rep unless you have a really hostile compiler. For types
> > like this, Unchecked_Conversion should work as expected in cases where
> > the number of bits of the source and target differs.
>
> At least you *hope* so; too bad for you if your application
> depends on it and the compiler doesn't do it right, or if
> you need to port to a "hostile" compiler. There being no
> rule for this in either Ada83 or Ada95 ....
Well, if your situation is that desperate, you could
follow the rep. clause in the same source file with
Enum_Rep : constant array (Enum_Type)
of Integer_Type_To_Convert_To := (.........);
This is portable--until you change the rep. spec and forget
to change the table! :-)
next prev parent reply other threads:[~1997-12-18 0:00 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-12-03 0:00 Ada Enumerations Jeffrey Harris
1997-12-03 0:00 ` James S. Rogers
1997-12-03 0:00 ` Robert Dewar
1997-12-03 0:00 ` Stanley R. Allen
1997-12-04 0:00 ` GNAT'Object_Size Mats Weber
1997-12-04 0:00 ` Ada Enumerations Robert Dewar
1997-12-04 0:00 ` Stanley R. Allen
1997-12-18 0:00 ` Wes Groleau [this message]
1997-12-04 0:00 ` GNAT'Object_Size Mats Weber
1997-12-04 0:00 ` GNAT'Object_Size Mats Weber
1997-12-04 0:00 ` GNAT'Object_Size Mats Weber
1997-12-08 0:00 ` GNAT'Object_Size Mats Weber
1997-12-10 0:00 ` GNAT'Object_Size Robert Dewar
1997-12-04 0:00 ` GNAT'Object_Size Mats Weber
1997-12-05 0:00 ` GNAT'Object_Size Mats Weber
1997-12-04 0:00 ` Ada Enumerations Matthew Heaney
1997-12-04 0:00 ` Stanley R. Allen
1997-12-07 0:00 ` Keith Thompson
1997-12-07 0:00 ` Robert Dewar
1997-12-08 0:00 ` Keith Thompson
1997-12-07 0:00 ` Matthew Heaney
1997-12-11 0:00 ` John G. Volan
1997-12-07 0:00 ` Matthew Heaney
1997-12-04 0:00 ` Stephen Leake
1997-12-04 0:00 ` Matthew Heaney
1997-12-04 0:00 ` Robert Dewar
1997-12-06 0:00 ` Jean-Pierre Rosen
1997-12-06 0:00 ` Making Predefined Operators Abstract Matthew Heaney
-- strict thread matches above, loose matches on Subject: below --
1997-12-10 0:00 Ada enumerations Stanley R. Allen
1997-12-10 0:00 ` John M. Mills
1997-12-10 0:00 ` Robert Dewar
1997-12-11 0:00 ` Stanley R. Allen
1997-12-12 0:00 ` Robert Dewar
1997-12-11 0:00 ` Mats Weber
1997-12-11 0:00 ` Robert Dewar
1997-12-12 0:00 ` Mats Weber
1997-12-12 0:00 ` Robert Dewar
1997-12-12 0:00 ` Samuel T. Harris
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox