comp.lang.ada
 help / color / mirror / Atom feed
From: Mark A Biggar <mark.a.biggar@lmco.com>
Subject: Re: First attribute on Enumerated types
Date: 1999/02/24
Date: 1999-02-24T00:00:00+00:00	[thread overview]
Message-ID: <36D41C20.D5B8F61E@lmco.com> (raw)
In-Reply-To: 36D3678F.6C3CB1F6@aasaa.ofe.org

David Starner wrote:
> Since I quickly composed the first message, here's the actual code.
> Color is definitely a type. It should be enumerated - is there any
> way to tell the compiler that? In retrospect, that's probably my error.
> 
> with Lists;
> generic
>     type Node_type is private;
>     type Color is private;

change this to:

       type Color is (<>);

That will restrict Color to either an emumeration or an integer range.  Now
if you write the body code so that it only uses 'first, 'last, 'succ, 'pred,
etc. it should work correctly given any discrete type.

--
Mark Biggar
mark.a.biggar@lmco.com




  parent reply	other threads:[~1999-02-24  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <001e01be5f9d$ebe4d7e0$5b824a0c@rogers>
1999-02-23  0:00 ` First attribute on Enumerated types David Starner
1999-02-24  0:00   ` Matthew Heaney
1999-02-24  0:00   ` John English
1999-02-24  0:00   ` Mark A Biggar [this message]
1999-02-23  0:00 David Starner
replies disabled

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