Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!deimos.cis.ksu.edu!atanasoff!hascall From: hascall@atanasoff.cs.iastate.edu (John Hascall) Newsgroups: comp.lang.c Subject: Re: A question of style Message-ID: <2027@atanasoff.cs.iastate.edu> Date: 28 Nov 89 02:09:34 GMT References: <1989Nov23.170838.10376@phri.nyu.edu> <1989Nov26.000042.2976@utzoo.uucp> Reply-To: hascall@atanasoff.UUCP (John Hascall) Organization: Iowa State Univ. Computation Center Lines: 16 In article henry@utzoo.uucp (Henry Spencer) writes: }In article roy@phri.nyu.edu (Roy Smith) writes: }>Would you be confused and/or grossed out if you saw: }> if (something) }> perror ("message"), exit(1); }I think the correct word is "wary"... }If you do perror-and-exit a lot, package it up as a utility function. Or as a macro: #define COMPLAIN_AND_DIE(msg) perror(msg),exit(1) if (something) COMPLAIN_AND_DIE("message"); John Hascall