On 9/25/07, Jesus Galan <[EMAIL PROTECTED]> wrote:
> On Tue, Sep 25, 2007 at 09:29:36PM +0200, Szabolcs Nagy wrote:
> > #define ISTILE    isarrange(tile) /* || isarrange(<custom>) */
> >
> > can be misleading with custom layouts since in zoom() it is used like
> >
> > if(.. !ISTILED ..) return;
> >
> > so either there should be a comment about parenthesis in config.def.h
> > or zoom should use it like 'if(.. !(ISTILED) ..)'
>
> I see your point, but I think it is implicit that you should use
> parenthesis in complex expressions, in the same way that you have
> to use quotation marks in strings, for example (IMVHO).

I don't think that's the prevailing view but rather "if a macro has
been made to look like a variable, then it should be safe to use it as
you would a normal variable", particularly since misuse is unlikely to
lead to a compilation error but rather silent wrong code (as
happened).

-- 
cheers, dave tweed__________________________
[EMAIL PROTECTED]
Rm 124, School of Systems Engineering, University of Reading.
"we had no idea that when we added templates we were adding a Turing-
complete compile-time language." -- C++ standardisation committee

Reply via email to