comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Compiler error: 'Expect procedure name in procedure call'
Date: 04 Nov 2002 16:08:11 -0500
Date: 2002-11-04T21:19:12+00:00	[thread overview]
Message-ID: <usmyhrqkk.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 3DC6DCC4.60301@worldnet.att.net

Jim Rogers <jimmaureenrogers@worldnet.att.net> writes:

> You are actually calling C functions. It is still a bad idea to
> ignore a return value. The return value is your only indication of an
> error from a C function. Ignoring errors is a BAD idea.

For most C functions, I agree with this. However, for the specific
case of Win32 C functions, many have a return value which is _defined_
to be "TRUE", and many others have no documentation on what the return
value might be.  This is a side effect of the C compilers letting you
ignore return values; the Win32 authors apparently said something like
"Well, this return value is pretty meaningless, but people can always
ignore it, and we have a coding standard that says 'return a value'"
:). 

So in some cases, if you have documentation and testing to back it up,
you _should_ ignore return values.

-- 
-- Stephe



  reply	other threads:[~2002-11-04 21:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-04 15:05 Compiler error: 'Expect procedure name in procedure call' Jon
2002-11-04 15:35 ` Stephen Leake
2002-11-04 19:57   ` Jon
2002-11-04 20:35     ` Björn Lundin
2002-11-04 20:53       ` Björn Lundin
2002-11-04 20:48     ` Jim Rogers
2002-11-04 21:08       ` Stephen Leake [this message]
2002-11-05 22:15         ` Frank J. Lhota
2002-11-05 20:51       ` Programmer Dude
2002-11-06 15:06         ` Ted Dennison
2002-11-04 21:40     ` Vinzent Hoefler
2002-11-05  9:29       ` Jon
2002-11-05  9:55         ` Dale Stanbrough
2002-11-06 23:29         ` Randy Brukardt
2002-11-05 14:22     ` Ted Dennison
replies disabled

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