From: Matthew Heaney <matthew_heaney@acm.org>
Subject: Re: About to give up...
Date: 1998/08/08
Date: 1998-08-08T00:00:00+00:00 [thread overview]
Message-ID: <m3k94kl30y.fsf@mheaney.ni.net> (raw)
In-Reply-To: dewar.902545843@merv
dewar@merv.cs.nyu.edu (Robert Dewar) writes:
> In fact the ease of accidentally ignoring returned values is one of the
> great weaknesses in C. C almost invites programs to avoid taking the
> effort to deal with error indications.
>
> If you *do* want to completely ignore returned result, I find a useful
> notation to be
>
> Discard (func (params));
>
> where Discard is an inlined null procedure that ignores its parameter.
One thing you can do in C is to explicitly cast away the return value
(void) func (params);
This at least tells your reader that you didn't accidently ignore the
return value.
next prev parent reply other threads:[~1998-08-08 0:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-08-06 0:00 About to give up i96danma
1998-08-06 0:00 ` dennison
1998-08-07 0:00 ` i96danma
1998-08-07 0:00 ` Robert Dewar
1998-08-08 0:00 ` Dan Mattsson
1998-09-05 0:00 ` Tom Moran
1998-08-08 0:00 ` Matthew Heaney [this message]
1998-08-08 0:00 ` Robert Dewar
1998-08-08 0:00 ` Matthew Heaney
1998-08-06 0:00 ` Robert Dewar
1998-08-08 0:00 ` Dan Mattsson
1998-08-10 0:00 ` Robert Dewar
-- strict thread matches above, loose matches on Subject: below --
1998-08-16 0:00 Robert Dewar
1998-08-06 0:00 i96danma
1998-08-06 0:00 ` Oliver.Kellogg
1998-08-07 0:00 ` Tarjei Tj�stheim Jensen
1998-08-06 0:00 ` Dale Stanbrough
1998-08-06 0:00 ` Peter Amey
1998-08-06 0:00 ` Tom Moran
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox