Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!rpi!dali.cs.montana.edu!milton!uw-beaver!ubc-cs!alberta!oha!tony From: tony@oha.UUCP (Tony Olekshy) Newsgroups: comp.lang.c Subject: Re: How to force cpp to abort? Message-ID: <444@oha.UUCP> Date: 16 Aug 90 19:05:52 GMT References: <17377@haddock.ima.isc.com> <1990Aug14.174615.22829@zoo.toronto.edu> Organization: Olekshy Hoover & Associates Ltd., Edmonton, Alberta, Canada. Lines: 29 In-Reply-To: Message <1990Aug14.174615.22829@zoo.toronto.edu> dated 14 Aug 90 17:46:15 GMT In message <1990Aug14.174615.22829@zoo.toronto.edu>, henry@zoo.toronto.edu (Henry Spencer) writes: > > In article mikeg@c3.c3.lanl.gov > (Michael P. Gerlek) writes: > > > >... Can someone tell me why there isn't something > >like an "#abort error-message-here" directive that *would* terminate? > > Response to error conditions was generally considered to be a "quality > of implementation" issue outside the province of the standard. One > might ask why you *want* to do this... From the Indian Hill C Style and Coding Standards as amended for U of T Zoology UNIX: 32. If you #ifdef dependencies, make sure that if no machine is specified, the result is a syntax error, not a default machine! This is excellent advice. However, it would be nice if the user could be given some information on what happened, instead of just a syntax error. We use #include "*** Useful Message Here ***", which works, but says things like ``can't find *** Useful Message Here ***'', which is slightly misleading if you're not expecting it. -- Yours etc., Tony Olekshy. Internet: tony%oha@CS.UAlberta.CA BITNET: tony%oha.uucp@UALTAMTS.BITNET uucp: alberta!oha!tony