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,984d3d7860d7c8c X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!wn14feed!worldnet.att.net!12.120.4.37!attcg2!ip.att.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Where are returned values stored? Date: 29 May 2004 07:19:02 -0600 Organization: LJK Software Message-ID: <3bxeqHcbeKgM@eisner.encompasserve.org> References: <75s9b0pgo91ctvlm5op2rcql82t9ip4me2@4ax.com> <1dptc.49822$tb4.1731604@news20.bellglobal.com> <2lNtc.56154$tb4.2140194@news20.bellglobal.com> <60328483.MtZnWf8h2m@linux1.krischik.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1085833044 10877 192.135.80.34 (29 May 2004 12:17:24 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Sat, 29 May 2004 12:17:24 +0000 (UTC) Xref: controlnews3.google.com comp.lang.ada:907 Date: 2004-05-29T07:19:02-06:00 List-Id: In article <60328483.MtZnWf8h2m@linux1.krischik.com>, Martin Krischik writes: > Warren W. Gay VE3WWG wrote: > >> > Interesting to consider this with a recursive procedure, but yes, it >> > should work. >> > >> > JAF >> >> Calling Conventions: >> >> If this indeed happens (on a given platform), I would think >> that the calling convention used is +critical+. For example, >> if you forced an Ada routine to use the C calling convention, >> I would bet that on most platforms, that all return values >> must be _copied_ or placed on the heap (temporarily). At least >> this would be true for strings/arrays etc. where the size >> was not known in advance. Just jumping in, this seems to be an OS-independent discussion. > The "C" calling convention places the return value inside a hidden static > variable. A pointer to this variable is then returned. I am not sure what you mean by "the" C calling convention. Certainly on VMS C obeys the OS calling convention for all inter-module calls, just as other languages do.