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,4180a73b05d119c7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-18 00:59:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!iad-peer.news.verio.net!news.verio.net!newsfeed.vmunix.org!uio.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: ML-like alternatives to out parameters for functions Date: Tue, 18 Mar 2003 08:59:16 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: kiuk0152.chembio.ntnu.no X-Trace: tyfon.itea.ntnu.no 1047977956 144 129.241.83.78 (18 Mar 2003 08:59:16 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Tue, 18 Mar 2003 08:59:16 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:35440 Date: 2003-03-18T08:59:16+00:00 List-Id: Mark Lorenzen wrote: > > procedure Proc (Arg : in AT; Result : out RT; Validity : out Boolean); > > which is just a variant of the C hack and definately not beautiful. What makes this : function Calculate (Argument : in AT; Result_Valid : out Boolean) return RT; anymore beautiful? If you need to check if some return was valid I cannot see why one should use a function. If it just so that one can write: Rt_Var := Calculate (Some_AT, Success); then this is more C hack-flavoured to me than using Calculate (Some_AT, Rt_Var, Success); -- Preben Randhol ---------------- http://www.pvv.org/~randhol/ ._. Debian 3.0 |"Don't think about domination, think about freedom, / _,\ GNU/Linux | it doesn't dominate." - Richard M. Stallman | (_./ ><> ><> ><>| To learn more visit => http://www.debian.org/ \,_