[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: for_UP_and_DOWN

From: Łukasz Czerwiński
Subject: Re: for_UP_and_DOWN
Date: Sun, 15 Apr 2012 16:54:14 +0200

On 15 April 2012 16:49, David Kastrup <address@hidden> wrote:
Łukasz Czerwiński <address@hidden> writes:
> I'd like to write code, that will make Lilypond better or easier to be
> used

Not necessarily the same as "the C++ way".

Right :) No iterators needed here :)

> and it's not my goal to fulfill my ambitions to force unwanted
> changes, so:
> 1) As Graham and Keith wanted for(UP_and_DOWN), the macro and example
> is:
> #define UP_and_DOWN(d) \
> Direction d = UP; d != CENTER; flip(&d), d == UP ? d = CENTER : d

That looks rather nonsensical.  Why use flip at all here, and what with
the obscure : d as a nop?  You could write

; d = d == UP ? DOWN : CENTER ;

Yeah, you're absolutely right, that way is simpler, thanks :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]