lilypond-user
[Top][All Lists]
Advanced

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

Re: bookparts


From: Wols Lists
Subject: Re: bookparts
Date: Mon, 5 Mar 2018 20:33:58 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0

On 05/03/18 17:55, Kieren MacMillan wrote:
> Hi Knut,
> 
>> Because the definition of testing is invalid at that point of the main
>> source file. If tempTest.ly would contain e.g. a score or a \paper block
>> no error would occur.
> 
> No, it still throws an error because you can't define a variable inside a 
> \bookpart (which is what \include-ing it at that point does).
> 
And as a programmer, I think "scope". You are defining the variable
where you want to use it. It's widely accepted that that is good
practice, global variables lead to errors, mistakes and confusion. But
here you are forced to declare your variables at the global level :-(

Cheers,
Wol




reply via email to

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