Path: 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: <594@cybaswan.UUCP> Reply-To: pardo@uw-june.cs.washington.edu (David Keppel) Organization: University of Washington, Computer Science, Seattle Lines: 16 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