comp.lang.ada
 help / color / mirror / Atom feed
* Ada Enumerations
@ 1997-12-03  0:00 Jeffrey Harris
  1997-12-03  0:00 ` James S. Rogers
  1997-12-04  0:00 ` Ada Enumerations Stephen Leake
  0 siblings, 2 replies; 28+ messages in thread
From: Jeffrey Harris @ 1997-12-03  0:00 UTC (permalink / raw)



I have created an Ada Enumeration called DataTypes, afterwards I've created a
'use' clause where I give each element an integer value.  The last Enumeration
is LASTTYPE and is given a value of 100.

Now to the problem.  I'd like to be able to do something like the following..


NewLocation: Integer := DataTypes.LASTTYPE + 1;  -- Newlocation = 101

The compiler isn't letting me do this.  I've tried to use 'value, 'pos, and
'val to no avail, how do I convert an Ada enumerated type into an integer value?


Thanx... Please e-mail me at harris@pcisys.net

Jeff Harris




^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~1997-12-18  0:00 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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-05  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-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       ` 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
1997-12-04  0:00       ` GNAT'Object_Size Mats Weber
1997-12-04  0:00 ` Ada Enumerations 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

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