From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c8479e1c256aac0d,start X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Ada as 2nd Lang, p. 678 Date: 1997/04/30 Message-ID: #1/1 X-Deja-AN: 238578277 References: <5k92el$bs9@ultranews.duc.auburn.edu> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-04-30T00:00:00+00:00 List-Id: 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 (818) 985-1271