Graham Percival <[EMAIL PROTECTED]> writes:

> How does let* work?  I mean, how would I modify
>    (define hmoveDivOne
>     (if (equal? divone "16")
>      0.6
>      0.0))
>
> to use let* instead of define?  (simple replacement produced an error)

In this case let* isn't necessary. let is used to define local variables
while let* is used to create local variables in sequence (e.g. when you
need to use a just defined local variable inside a subsequent local
variable). this should do it:

#(define (compound-time grob one two divone divtwo)
  (let ((hmoveDivOne
         (if (equal? divone "16")
              0.6
              0.0))
        (hmoveDivTwo
         (if (equal? divtwo "16")
             0.6
             0.0))
        (hmoveLastCol
         (if (equal? divtwo "16")
             -0.6
             -0.3)))
    (interpret-markup
     (ly:grob-layout grob)
     '(((baseline-skip . 2)
        (word-space . 1.5)
        (font-family . number)))
     (markup
      #:line ( #:column ((#:translate (cons hmoveDivOne 0) one) divone)
                        #:lower 1 (#:translate (cons hmoveDivOne 0) "+") 
                        (#:translate (cons hmoveLastCol 0)
                                     #:column ((#:translate (cons hmoveDivTwo 0)
                                                            two) divtwo)))))))

Cheers,

Pedro


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to