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,99222a5bd46ef3c9 X-Google-Attributes: gid103376,public From: jsa@alexandria.organon.com (Jon S Anthony) Subject: Re: Function result Date: 1997/06/27 Message-ID: #1/1 X-Deja-AN: 253051200 Distribution: world References: <19970619161801.MAA18772@ladder02.news.aol.com> <5os5r8$4ud@netline.jpl.nasa.gov> Organization: PSI Public Usenet Link Newsgroups: comp.lang.ada Date: 1997-06-27T00:00:00+00:00 List-Id: In article <5os5r8$4ud@netline.jpl.nasa.gov> vsnyder@gyre.jpl.nasa.gov (Van Snyder) writes: > pass the address where the function result is to land as a "hidden argument." > In this way, the syntactic device of assigning to the function result > _really_is_ assigning directly to the function result -- no extra copying > involved. > > By the way, this would eliminate the problem about returning a limited > type in Ada. ???? What problem is that??? > 1. The client is expected to supply the address where the function result > is desired as a "hidden argument". Sounds like a procedure with an out parameter... > 3. Since there's no copying going on outside the function, it would be OK > to allow returning a limited type. There's no problem in returning a limited type. I do it all the time. What do mean here??? > 4. In the function, the result would be materialized by storing into the > result variable, not by mentioning the value in a "return" statement. Well, this _WOULD_ seem to cause a problem with returning limited types, as it would require assignment. /Jon -- Jon Anthony OMI, Belmont, MA 02178 617.484.3383 "Nightmares - Ha! The way my life's been going lately, Who'd notice?" -- Londo Mollari