A solution to the multiple inclusion problem

Sandy Mustard mustard at sdrc.UUCP
Wed Oct 25 07:50:59 AEST 1989



A solution to multiple include file inclusion that I propose would be:

#exit

thus you could write:

#ifdef this_h_file
#exit
#define this_h_file
...
#endif

The preprocessor/compiler on seeing the #exit directive could ignore everything
following it in the file (and could simply close the file.)

Sandy Mustard
mustard at sdrc.UU.NET



More information about the Comp.lang.c mailing list