Hans Aberg <[email protected]> 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 _______________________________________________ lilypond-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-devel
