comp.lang.ada
 help / color / mirror / Atom feed
From: Preben Randhol <randhol+news@pvv.org>
Subject: Re: ML-like alternatives to out parameters for functions
Date: Tue, 18 Mar 2003 08:59:16 +0000 (UTC)
Date: 2003-03-18T08:59:16+00:00	[thread overview]
Message-ID: <slrnb7dnv1.l3.randhol+news@kiuk0152.chembio.ntnu.no> (raw)
In-Reply-To: m365qhh8ju.fsf@valhal.vikingnet

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/       \,_



  parent reply	other threads:[~2003-03-18  8:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-17 22:17 ML-like alternatives to out parameters for functions Mark Lorenzen
2003-03-17 21:47 ` Stephen Leake
2003-03-17 23:34   ` Mark Lorenzen
2003-03-18  3:54     ` John R. Strohm
2003-03-18  8:59     ` Preben Randhol [this message]
2003-03-18 21:09     ` tmoran
2003-03-18 17:04   ` Frank J. Lhota
2003-03-18 18:52     ` Mark Lorenzen
2003-03-18 19:16       ` Frank J. Lhota
2003-04-01  3:39         ` Robert I. Eachus
2003-04-01 14:51           ` Frank J. Lhota
2003-03-18  8:37 ` Dmitry A. Kazakov
2003-03-18  9:07 ` Preben Randhol
2003-03-19  7:31 ` Mark Biggar
  -- strict thread matches above, loose matches on Subject: below --
2003-04-02  0:23 Alexandre E. Kopilovitch
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox