comp.lang.ada
 help / color / mirror / Atom feed
* RE: Enumerated types
@ 2001-02-20 19:28 Beard, Frank
  0 siblings, 0 replies; only message in thread
From: Beard, Frank @ 2001-02-20 19:28 UTC (permalink / raw)
  To: 'comp.lang.ada@ada.eu.org'


-----Original Message-----
From: Andrew Hately [mailto:hat@cfmu.eurocontrol.be]

> type level is ( empty, low, medium, high, full, overflowing ) ;
> subtype critical_level is level <some_new_keyword> (empty, full,
overflowing);

There have been a number of times where I have needed to do this.


> Also, would Jeff Creem's  <with>  enumeration extension construct be
> applicable thus:
>
> type hard_fruit is ( apple, pear ) ;
> type soft_fruit is ( strawberry, raspberry ) ;
> type fruit is hard_fruit with soft_fruit ;

That's an interesting alternative.  But now you basically have a multiple
inheritance situation.

Frank




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-02-20 19:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-20 19:28 Enumerated types Beard, Frank

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