At 06:13 PM 10/11/2001 -0700, Wizard wrote:
>I noticed that many of header files use the following format:
>#if !defined(H_GUARD)
>Is this preferable to "#ifndef"?

I find it clearer to read.

>  I always thought that the defined()
>function was only for more complex tests.

Doesn't really matter--both work fine.

>Additionally, the defined()
>function may not be entirely portable (it might be missing on AIX, but I'm
>not positive as I don't have such a system handy).
>just curious,

Well, other definedness checks use it, so platforms without it are sorta 
out of luck anyway. I'd be really surprised if the AIX C compiler doesn't 
do this. (I think it's a C89 requirement, but I'm not 100% sure)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to