Nicolas Sceaux schrieb:
> Here is the structure of your function:
>
> setAltStaff =
> #(define-music-function (parser location style lowerOctave upperOctave)
> (string? number? number?)
> (if #t
> #{ ..foo.. #})
> #{ ..baz.. #})
>
> The function return the last form, which is always #{ ..baz.. #}.
> You should write instead:
>
> setAltStaff =
> #(define-music-function (parser location style lowerOctave upperOctave)
> (string? number? number?)
> (if condition
> #{ ..foo.. #}
> #{ ..baz.. #}))
But is that what Kevin wants to do? As far as I understood, he wants the
#{ ..baz.. #} part to be executed unconditionally. In your construct, it
acts as an _alternative_ to the #{ ..foo.. #} part. I must confess that
I only gave it a quick glance, but since the 'if' construct in his code
uses side-effects, it shouldn't matter what the function actually
returns. So it should work as intended. Or am I wrong?
Max
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user