|
From: | Urs Liska |
Subject: | Re: check undefined variable scheme |
Date: | Thu, 24 May 2018 10:08:29 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Am 24.05.2018 um 09:56 schrieb
Gianmaria Lari:
Two observations: - You don't need that (begin ...) wrapper because the procedure definition already behaves as such - You shouldn't use reserved words for variable names, so I'd use 'counter' instead.
Yes, see: \version "2.19.80" #(define (nextcount) (if (not (defined? 'counter)) (ly:parser-define! 'counter 0)) (set! counter (+ 1 counter)) (number->string counter) ) #(ly:message "~a" (nextcount)) #(ly:message "~a" (nextcount)) HTH Urs
|
[Prev in Thread] | Current Thread | [Next in Thread] |