How to force cpp to abort?
Tony Olekshy
tony at oha.UUCP
Fri Aug 17 05:05:52 AEST 1990
In message <1990Aug14.174615.22829 at zoo.toronto.edu>, henry at zoo.toronto.edu
(Henry Spencer) writes:
>
> In article <MIKEG.90Aug13092741 at c3.c3.lanl.gov> mikeg at 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 at CS.UAlberta.CA
BITNET: tony%oha.uucp at UALTAMTS.BITNET
uucp: alberta!oha!tony
More information about the Comp.lang.c
mailing list