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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2def9aa85afa5d22 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-30 07:13:21 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Joint Strike Fighter Date: Fri, 30 Nov 2001 09:46:34 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9u863s$lo$1@nh.pace.co.uk> References: <3BDCE159.39F6D422@adaworks.com> <11bf7180.0110290311.4d8d6f04@posting.google.com> <3BDF9C6A.C25520C5@adaworks.com> <3BE023AB.8F235EF5@sparc01.ftw.rsc.raytheon.com> <9rp8mo$6d8$1@nh.pace.co.uk> <11bf7180.0111010338.6dbc1537@posting.google.com> <9u5q9g$md$1@nh.pace.co.uk> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1007131580 696 136.170.200.133 (30 Nov 2001 14:46:20 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 30 Nov 2001 14:46:20 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:17219 Date: 2001-11-30T14:46:20+00:00 List-Id: Well, there may be issues with any given implementation of Ada and how it chooses to handle things, but there isn't anything that I know of inherent in Ada that would force pass-by-value of a large record structure. Some implementations of Ada could be grossly inefficient in all sorts of areas without that being something intrinsic in the language. I would think that a sensible implementation of Ada would look at the size of the item being passed and decide on the most efficient means for the given architecture. AFAIK, the in/out-ness of a parameter shouldn't force a pass-by-value (the language lawyers can correct me here) but pretty definitely an "in out" ought to be able to go by reference. (Again presuming that the compiler makes an intelligent choice about how to pass the parameter for maximum efficiency.) Are there implementations out there that pass a large record or array by value if the mode is "in out"? (Beyond efficiency, I'd park the PBV/PBR issue in the "Don't Care" lot. If the compiler picks the fastest possible means of transferring the parameter (and protects the in/out-ness through static analysis), but my code depends on side effects of PBR, I've probably done a bad job of designing the code.) MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Simon Wright" wrote in message news:x7v7ks8bf0g.fsf@galadriel.frlngtn.gecm.com... > > I'm not sure that this particular issue is the right way round (well, > it wasn't for me when I encountered it). > > I had a Socket (record) type which needed to be passed by reference > but wasn't; the cure was to make it tagged, which I was less than > happy with. I forget why 'limited' wouldn't do .. > > So I _did_ have to do something explicit to get pass-by-reference.