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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5bfab93693a9feee X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-25 16:03:34 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn11feed!wn12feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc53.POSTED!not-for-mail From: Stapler Subject: Re: parameter modes Newsgroups: comp.lang.ada References: <3e09fd53.18465812@news.freenet.de> User-Agent: Pan/0.11.4 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "Jeffrey Creem" Message-ID: NNTP-Posting-Host: 12.241.145.39 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc53 1040861020 12.241.145.39 (Thu, 26 Dec 2002 00:03:40 GMT) NNTP-Posting-Date: Thu, 26 Dec 2002 00:03:40 GMT Organization: AT&T Broadband Date: Thu, 26 Dec 2002 00:03:40 GMT Xref: archiver1.google.com comp.lang.ada:32309 Date: 2002-12-26T00:03:40+00:00 List-Id: On Wed, 25 Dec 2002 15:32:57 -0500, Jeffrey Creem wrote: > If you are just worried about run time efficiency then just don't worry > about it. The compiler (any decent compiler (or even some bad ones I > have used)) do the "right" thing with repect to making a copy or not. > > The in, out, in out is not like the old pascal "var" mode. > > If you really do need to force something specific on a case base case > basis (for some reason other than efficiency) then probably something > like access might be appropriate. Do you know if it's possible within the Ada language to define an optional compiler instruction or pragma that says something like this ... if memory_region < X_number_of_bytes then Pass_by_copy(memory_region, Destination); else Pass_by_access_type(memory_region); end if; Just curious. Stapler