comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: First attribute on Enumerated types
Date: 1999/02/24
Date: 1999-02-24T00:00:00+00:00	[thread overview]
Message-ID: <m3hfscfoqf.fsf@mheaney.ni.net> (raw)
In-Reply-To: 36D3678F.6C3CB1F6@aasaa.ofe.org

David Starner <dstarner98@aasaa.ofe.org> writes:

> 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; 
> package Tree is

Say this instead:

generic 
    type Node_type is private;
    type Color is (<>);
package Tree is

Read the section of the RM (or your fav textbook) that describes
"generic formal types."






  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 [this message]
1999-02-24  0:00   ` John English
1999-02-24  0:00   ` Mark A Biggar
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