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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 24 Nov 2013 01:20:46 -0600 Date: Sat, 23 Nov 2013 23:20:53 -0800 From: FritzVonBraun User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: How To Pass Large Object Arguments Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-zjT4N8uflJpQ8hV3I9rPXnnmLgotKif1F2uIe5qHNcW9rn9DhfpHTv3qON5WZp9DIxbsfBKq+J0TRwZ!rZ+isthmiUPUvFE21QoinJzYQB6ulKpIQ4XYfv25t+EbyBkUQH9IiKZj8nhmqH7iK9+8H5ykHLL2 X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2328 Xref: number.nntp.dca.giganews.com comp.lang.ada:183981 Date: 2013-11-23T23:20:53-08:00 List-Id: Hello all, I am fairly new to Ada and I am wondering how I should pass large parameters to subprograms like arrays or records that contain other components like vectors or lists. I did a lot of reading but wasnt able to find a definite answer. the general consensus I got from Barne's book and various blogs and whitepapers from Universities was that in theory IN parameters are copied but the compiler manufacturer is free to implement a reference to the original object and so on. So basically what I found out there is no concrete rule that says "parameter of that size or greater are passed by reference internally" So my question is, is there a de facto standard at least? What does Gnat do in such cases? (In all honesty, my programs will never run on anything but Gnat, so other compilers don't really matter to me). I am considering passing objects that I think are too big for a copy operation through an access parameter, but that would basically contradict the principle of problem orientation instead of machine orientation. I would really rather be able to handle these situations without having to worry about the underlying mechanism myself. Thanks for any advice