[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to define a boolean?
From: |
Carl Sorensen |
Subject: |
Re: how to define a boolean? |
Date: |
Sat, 8 Aug 2009 14:29:59 -0600 |
On 8/8/09 2:20 PM, "Marc Hohl" <address@hidden> wrote:
> Carl Sorensen schrieb:
>> [...]
>>>> For the music-function you can do this:
>>>>
>>>> % you can also do:
>>>> % mybool = ##f
>>>> #(define mybool #f)
>>>>
>>
>> Why not just change this to
>>
>> #(define-public mybool #f)
>>
>> then use mybool everywhere else?
>>
> I tried this first, but it seems that it doesn't work inside a
> music-function.
>
This seems to work for me:
#(define-public myBool #t)
myMusicFunc =
#(define-music-function (parser location) ()
(display "\nIn myMusicFunc\n")
(display "myBool: ")(display myBool)(newline)
(set! myBool #f)
(display "myBool: ")(display myBool)(newline)
(make-music 'SequentialMusic 'void #t))
\relative c'' {
c4
\myMusicFunc
c c c
}
Was there something else you were trying to do?
Carl
- how to define a boolean?, Marc Hohl, 2009/08/08
- Re: how to define a boolean?, Mark Polesky, 2009/08/08
- Re: how to define a boolean?, Marc Hohl, 2009/08/08
- Re: how to define a boolean?, Carl Sorensen, 2009/08/08
- Re: how to define a boolean?, Marc Hohl, 2009/08/08
- Re: how to define a boolean?,
Carl Sorensen <=
- Re: how to define a boolean?, Marc Hohl, 2009/08/09
- Message not available
- Re: how to define a boolean?, Marc Hohl, 2009/08/09
- Re: how to define a boolean?, Nicolas Sceaux, 2009/08/09
- Re: how to define a boolean?, Marc Hohl, 2009/08/09
- Re: how to define a boolean?, Carl Sorensen, 2009/08/09
- Re: how to define a boolean?, Carl Sorensen, 2009/08/09
- Re: how to define a boolean?, Marc Hohl, 2009/08/09
- Re: how to define a boolean?, Carl Sorensen, 2009/08/09
- Re: how to define a boolean?, Marc Hohl, 2009/08/10
- Re: how to define a boolean?, Carl Sorensen, 2009/08/10