lilypond-devel
[Top][All Lists]
Advanced

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

Re: Coding style


From: David Kastrup
Subject: Re: Coding style
Date: Thu, 13 Jan 2011 20:25:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hans Aberg <address@hidden> writes:

> On 13 Jan 2011, at 16:50, David Kastrup wrote:
>> Doesn't C++ have some more useful
>> idiom for iterators or so?
>
> Then you'd have to write a function to apply. Below is an example; I
> let you decide if it is more useful. :-)
>
>> Something like
>>
>>    for (d=UP;;d=DOWN) {
>>      ...
>>      if (d == DOWN)
>>         break;
>>    }
>>
>> would be somewhat prettier in my book and involve less calculation.
>
>
> Or
>   for (d=UP;d==UP;d=DOWN) {
>     ...
>   }

That one looks rather pretty.  It just has the disadvantage of running
only for UP...

-- 
David Kastrup




reply via email to

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