From: mheaney@ni.net (Matthew Heaney)
Subject: Re: Ada as 2nd Lang, p. 678
Date: 1997/04/30
Date: 1997-04-30T00:00:00+00:00 [thread overview]
Message-ID: <mheaney-ya023680003004972234010001@news.ni.net> (raw)
In-Reply-To: 5k92el$bs9@ultranews.duc.auburn.edu
In article <5k92el$bs9@ultranews.duc.auburn.edu>,
johng@discovery.eng.auburn.edu (John M. Greer) wrote:
You need to separate files. One for the spec, the other for the body.
file cyclic_successor_template.ads:
>GENERIC
> TYPE Discrete_Type IS (<>);
> FUNCTION Cyclic_Successor_Template (X : Discrete_Type) RETURN Discrete_Type;
file cyclic_successor_template.adb:
> FUNCTION Cyclic_Successor_Template (X:Discrete_Type) RETURN Discrete_Type IS
> BEGIN
> IF X = Discrete_Type'Last THEN
> RETURN Discrete_Type'First; <<<--- I'm sure you meant 'First,
not ;First
> ELSE
> RETURN Discrete_Type'Succ(X);
> END IF;
> END Cyclic_Successor_Template;
--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271
next prev parent reply other threads:[~1997-04-30 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-05-01 0:00 Ada as 2nd Lang, p. 678 John M. Greer
1997-04-30 0:00 ` Matthew Heaney [this message]
1997-05-02 0:00 ` Robert Dewar
1997-05-09 0:00 ` nickerson
1997-05-12 0:00 ` Norman H. Cohen
-- strict thread matches above, loose matches on Subject: below --
1997-05-12 0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-05-13 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox