From: "Kent Paul Dolan" <xanthian@well.com>
Subject: Re: Out parameters in a function
Date: Wed, 17 Apr 2002 05:27:14 +0000 (UTC)
Date: 2002-04-17T05:27:14+00:00 [thread overview]
Message-ID: <27d08a4ae43640b7384ac285cf0983b5.48257@mygate.mailgate.org> (raw)
In-Reply-To: 3CBCFCC8.6000206@worldnet.att.net
"Jim Rogers" <jimmaureenrogers@worldnet.att.net> wrote:
> Well, almost. C does not have a boolean type.
Sorry, of course you're correct. The standard C include files have
defined TRUE and FALSE for so long and I've used them for so long I tend
to forget they aren't, per se, part of C, but just some of those
programming "implicit contracts" spoken of in another thread.
[And my usual usage before they came along was always:
#define TRUE ( 0 == 0 )
#define FALSE ( 0 == 1 )
anyway, since I didn't want to be dependent on a particular compiler
writer's picking the usual choice of treatments of 0 versus non-zero as
true or false, which I should have remembered.]
> C (since its first
> ANSI standard) does support returning structures. It could always
> return a pointer to a structure.
> Ada does not have the same sense of expressions as C.
> Specifically, an assignment operator in Ada does not return a value.
That is probably both good and bad; good, because stack cleanups or
alternate compilation paths for unused optionally produced values aren't
an issue; in this case unfortunate, since it prevents a fairly natural
way to accomplish what the original poster was seeking. Not that the
obvious way of breaking the suggestion I presented down into several
steps won't work, it is just much more awkward than using
value-providing assignment statements or polyadic valued functions.
Thanks for the corrections and further advice.
> Jim Rogers
xanthian, happiest probably programming in languages where one can
return a list of values from a procedure.
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
next prev parent reply other threads:[~2002-04-17 5:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-14 18:29 Out parameters in a function Nazgul
2002-04-14 19:45 ` David C. Hoos, Sr.
2002-04-15 10:49 ` John McCabe
2002-04-15 11:51 ` John McCabe
2002-04-15 13:43 ` Steve Doiel
2002-04-15 15:09 ` Ted Dennison
2002-04-16 8:49 ` John McCabe
2002-04-16 10:05 ` Dmitry A. Kazakov
2002-04-16 15:26 ` John McCabe
2002-04-16 19:34 ` Matthew Woodcraft
2002-04-16 20:10 ` Darren New
2002-04-17 1:30 ` Kent Paul Dolan
2002-04-17 16:15 ` Darren New
2002-04-19 17:39 ` Florian Weimer
2002-04-17 13:24 ` Stephen Leake
2002-04-17 16:32 ` Darren New
2002-04-17 21:03 ` Kent Paul Dolan
2002-04-18 12:14 ` Wolfgang Gellerich
2002-04-18 13:52 ` Dmitry A. Kazakov
2002-04-18 16:28 ` Darren New
2002-04-17 10:17 ` John McCabe
2002-04-16 19:58 ` Kent Paul Dolan
2002-04-16 20:00 ` Kent Paul Dolan
2002-04-17 4:40 ` Jim Rogers
2002-04-17 5:27 ` Kent Paul Dolan [this message]
2002-04-17 5:50 ` Eric G. Miller
2002-04-24 2:45 ` David Thompson
2002-04-19 17:40 ` Florian Weimer
2002-04-19 18:26 ` Jim Rogers
2002-04-19 18:53 ` Florian Weimer
2002-04-17 7:57 ` Dmitry A. Kazakov
2002-04-17 10:21 ` John McCabe
2002-04-24 17:21 ` Warren W. Gay VE3WWG
2002-04-26 7:32 ` Dmitry A. Kazakov
2002-04-15 16:24 ` Stephen Leake
2002-04-16 13:38 ` Ted Dennison
2002-04-17 11:55 ` Ingo Marks
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox