A question of style

John Hascall hascall at atanasoff.cs.iastate.edu
Tue Nov 28 13:09:34 AEST 1989


In article <???> henry at utzoo.uucp (Henry Spencer) writes:
}In article <???> roy at 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



More information about the Comp.lang.c mailing list