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, WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4d448bf6bac07244 X-Google-Attributes: gid103376,public From: blaak@mda.ca (Ray Blaak) Subject: Re: GNAT Problem on recursive generics? Date: 1996/12/02 Message-ID: <57v0mp$a0d@sparky.mda.ca>#1/1 X-Deja-AN: 201898974 references: <57moem$phr@sun04.tfh-berlin.de> content-type: text/plain; charset=us-ascii organization: Macdonald Dettwiler & Associates mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-12-02T00:00:00+00:00 List-Id: Recursion is certainly allowable. The problem is something else: e is "in out", but you are passing in a function result ('pred or 'succ) which is a constant. GNAT (correctly) does no find any foo with that profile. Either change e to "in", or assign to a variable before calling foo again. Cheers, Ray Blaak blaak@mda.ca weberwu@compute.tfh-berlin.de (Debora Weber-Wulff) writes: >Ran into this problem in GNAT 3.05 using the IDE on a PC the other >day: >-- foo.adb >procedure foo (e: in out element) is > begin > if 1=1 then > foo(element'pred(e)); > else > foo(element'succ(e)); >end if; >end foo; > >>> "foo" is not visible (more references follow) > >>> non-visible declaration at foo.ads:3