From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 24 Feb 93 16:20:52 GMT From: agate!howland.reston.ans.net!newsserver.jvnc.net!netnews.upenn.edu!prijat !guinness.cs.uofs.edu!beidler@ucbvax.Berkeley.EDU (Jack Beidler) Subject: Re: compilation order of generic body & instantiation Message-ID: <11705@prijat.cs.uofs.edu> List-Id: In article , erickson@cs.nps.navy.mil (David Erickson) writes: |> I ran into a compilation problem that I don't understand: the package below |> compiles, but if I attempt to instantiate it in a procedure ("driver"), the |> compiler (Meridian Sparc Ada) will produce an error listing at the point of |> instantiation. The error is: |> "driver.a", 3: identifier not found "binary_tree" [LRM 4.1/3] |> I ran into a similar problem some time ago when I was porting components from a PC (using Meridian's compiler) to a SUN (Using Meridian's compiler). Code that compiled on the PC would not compile on the SUN. I was able to resolve the problem by moving the body of a generic procedure to the front of the body of the generic package! Apparently for some reason it was looking for the body of the generic procedure in another procedure that was instantiating it. Once the body of the generic package was reorganized, my error message vanished. It appears from the code included in the posting, the problem is identical to the one I encountered. +------------------------------------------------------------------+ | John (Jack) Beidler | | Prof. of Computer Science Internet: BEIDLER@JAGUAR.UOFS.ED | | University of Scranton beidler@guinness.cs.uofs.edu| | Scranton, PA 18510 Bitnet : BEIDLER@SCRANTON | | | | Phone: (717) 941-7446 FAX: (717) 941-4250 | +------------------------------------------------------------------+