faustus@ucbvax.UUCP (06/05/84)
># define extern ># include "foo.h" ># undef extern Remember please that there are hacks and there are hacks. Some hacks are nasty and crude, and no self-respecting programmer would admit to having committed them. Other hacks are nifty and elegant and provide a touch of POSH and class to one's code; these haques are items of pride to good programmers and are caried around in one's wallet and show, with inordnate pride, to anyone who will stand still long enough. So what is this? I think that if anything qualifies as a nasty and crude hack, this one does. It doesn't save much time or effort, and it works only because external declarations happen to look very much like regular declarations. It has already been pointed out that you can't initialize the data if you use this, and besides, does it specify anywhere what things are defined as when you just say #define foo ? The null string? 1 ? ("1" wouldn't make the compiler very happy I'm sure...) Wayne
gwyn@brl-vgr.UUCP (06/08/84)
#define foo defines "foo" to map to "" (empty string). cc -Dfoo stuff.c defines "foo" to be "1".
boyd@basser.OZ (Boyd Roberts) (06/12/84)
This message is empty.