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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,103b407e8b68350b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-28 05:35:36 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: Anybody in US using ADA ? One silly idea.. User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Tue, 28 Jan 2003 13:24:24 GMT Content-Type: text/plain; charset=us-ascii References: <1041908422.928308@master.nyc.kbcfp.com> <1041997309.165001@master.nyc.kbcfp.com> <1042086217.253468@master.nyc.kbcfp.com> <1042477504.547640@master.nyc.kbcfp.com> <3E32B5C0.5090004@attbi.com> <1043684990.403565@master.nyc.kbcfp.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Organization: The World Public Access UNIX, Brookline, MA Xref: archiver1.google.com comp.lang.ada:33485 Date: 2003-01-28T13:24:24+00:00 List-Id: Hyman Rosen writes: > Is this any different than if the subprogram was not generic? > That is, suppose I just wrote a subprogram instead of an > instantiation: > type Element_Array is array(Integer range <>) of Element; > procedure Sort(EA: in out Element_Array) is > begin > -- uses EA(i) > EA(j) > end > and then I pass a pointer to Sort to another procedure. > Doesn't the same sort of thing have to be done as for the > generic? No, because you can't pass a nested procedure to a less-nested procedure. So in a display implementation, you can always pass just the address of the code. In a static-link implementation, you can pass just the address of the code for unnested procedures, and for procedures nested one level deep, but you need a static link for deeper ones. - Bob