Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Macros (Was: fdtable)
- X-seq: zsh-workers 1009
- From: Zefram <A.Main@xxxxxxxxxxxxxxxxx>
- To: bas@xxxxxxxxxxxx (Bas V. de Bakker)
- Subject: Re: Macros (Was: fdtable)
- Date: Wed, 8 May 1996 16:05:54 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199605080754.DAA00652@xxxxxxxxxxxxxxxxxxxxxxxx> from "Bas V. de Bakker" at May 8, 96 09:54:15 am
>When reading other people's code, I've regularly been bitten by the
>fact that the code was not what it looked like, due to a #define in
>one of the so many header files that was (directly or indirectly)
>included. The potential for errors is much less if one keeps all
>macros uppercase. So create a SIGNED macro that is either defined to
>signed or to nothing, like EXTERN.
In the case of signed, I disagree. The signed keyword usually has no
effect at all, so #defining it to nothing makes almost no difference to
its meaning. const, similarly, is purely a modifier, and #defining it
to nothing makes no difference to the meaning of the code, provided
it's legal to start with. The EXTERN macro is uppercase because it
doesn't simply mean extern; it means extern in most source files, but
it is different in one.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author