lilypond-user
[Top][All Lists]
Advanced

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

Re: how to define a boolean?


From: Marc Hohl
Subject: Re: how to define a boolean?
Date: Sun, 09 Aug 2009 17:03:18 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

Nicolas Sceaux schrieb:
Le 9 août 09 à 13:21, Marc Hohl a écrit :

#(define-public (slur::boolean grob)
;; just a test function to try and switch boolean values
  (display "\nWithin callback\n")
  (display "myBool: ")(display myBool)(newline)
  (if myBool
      (set! myBool #f)
      (set! myBool #t))

this can be written: (set! myBool (not myBool))
BTW, camel case is not usual in Scheme, better use hyphens.
:)

Hey, it was just a simple example - the code in real life is about 230 lines -
and I will /definitely/ not use a name like myBool...

  (display "myBool: ")(display myBool)(newline)
  (ly:slur::print grob))







reply via email to

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