Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!decprl!decprl!boyd From: boyd@prl.dec.com (Boyd Roberts) Newsgroups: comp.unix.questions Subject: Re: errno Message-ID: <1991Jun17.124318.1384@prl.dec.com> Date: 17 Jun 91 12:43:18 GMT References: <1991Jun15.151924.24619@thunder.mcrcim.mcgill.edu> <2157@mitisft.Convergent.COM> Sender: news@prl.dec.com (USENET News System) Organization: Digital Equipment Corporation - Paris Research Laboratory Lines: 13 Nntp-Posting-Host: prl313.prl.dec.com In article <2157@mitisft.Convergent.COM>, dold@mitisft.Convergent.COM (Clarence Dold) writes: > printf("Errno %d: %s\n", want_err, > want_err <= sys_nerr ? sys_errlist[want_err] : "Out of range" ); > > I like this one because it's one of the few places where the " ? : " > construct looks correct to me. Eh? The bounds of a reasonable errnos lie between 1 and sys_nerr. `errno == 0' means no error. Boyd Roberts boyd@prl.dec.com ``When the going gets wierd, the weird turn pro...''