🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #413

Re: Error Return (was Re: (char *)(-1))

#413
From: David Keppel
Date: Fri, 04 Aug 1989 17:09
16 lines
1354 bytes
iiitsh@cybaswan.UUCP (Steve Hosgood) writes:
>[errval(foo())]

Until it is `prior art', it probably doesn't belong in dpANS C.

Often, `-1' is used as a return value for things that can be array
indicies, because `-1' can't be an array index.  Having `errval'
requires that you know not just the return type, but also which kinds
of values are going to be meaningful (since, e.g., not all compilers
have condition codes).  To do this `right', you need a stronger typing
system than C provides.

	;-D on  ( Stronger types, with 40% more resolving power! )  Pardo
-- 
		    pardo@cs.washington.edu
    {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo
Technical Details
Message-ID: <8912@june.cs.washington.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!pardo
References: <GEOFF.89Jun11231924@onyx.cs.warwick.ac.uk| <2619@yunexus.UUCP| <388@celit.UUCP| <118@psitech.UUCP| <1063@tukki.jyu.fi| <1282@cbnewsl.ATT.COM| <617@prles2.UUCP| <220@ssp1.idca.tds.philips.nl> <594@cybaswan.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!uw-june!pardo
From: pardo@june.cs.washington.edu (David Keppel)
Newsgroups: comp.std.c
Subject: Re: Error Return (was Re: (char *)(-1))
Keywords: error, flag, exception
Message-ID: <8912@june.cs.washington.edu>
Date: 4 Aug 89 17:09:21 GMT
References: <GEOFF.89Jun11231924@onyx.cs.warwick.ac.uk| <2619@yunexus.UUCP| <388@celit.UUCP| <118@psitech.UUCP| <1063@tukki.jyu.fi| <1282@cbnewsl.ATT.COM| <617@prles2.UUCP| <220@ssp1.idca.tds.philips.nl> <594@cybaswan.UUCP>
Reply-To: pardo@uw-june.cs.washington.edu (David Keppel)
Organization: University of Washington, Computer Science, Seattle
Lines: 16