lilypond-user
[Top][All Lists]
Advanced

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

Re: Error: bad expression type


From: Thomas Morley
Subject: Re: Error: bad expression type
Date: Thu, 3 Jan 2019 11:48:41 +0100

Am Do., 3. Jan. 2019 um 11:00 Uhr schrieb Vaughan McAlley
<address@hidden>:
>
> On Thu, 3 Jan 2019 at 20:26, Andrew Bernard <address@hidden> wrote:
>>
>> Hi Christopher,
>>
>> I can't quite nut this one out, but you can't just have ##f sitting in the 
>> open between scores - it's a bad expression. You can't place in that 
>> location a variable referring to an expression that has a boolean as its 
>> evaluation.
>>
>> You can have markup between scores, so if you make this change it will work:
>>
>> titleFootnotes = \markup { \null }
>>
>
> Even
>
> titleFootnotes = {}
>
> works, which might be a little closer to “nothing” :-)
>
> Vaughan

Hi Christopher,

whenever you call something in a ly-file with \whatever, then this
needs to do one of three things (are there others?):
(1) initiate a markup
     Examples: \markup "whatever", a header finally leads to markup as well, etc
    Thus Andrew's suggestion works, although spacing is affected
(2) initiate music
    Examples: \new Staff \someMusic, etc
    Thus Vaughan's suggestion outputting empty music works, although a
warning may be issued:
    warning: no music found in score
(3) do something
    Examples: \layout, \score, \paper or calling a void-function, etc

Calling a variable bound to #f at toplevel does nothing of the above listed.

You want to say "if #f do-nothing", actually you say "if #f do-#f"
A method would be to say "if #f do-unspecified". While 2.14 was more
tolerant, *unspecified* will be understood from recent versions.

So you could do:

theFootnotes = ##f
myOtherFootnotes = #*unspecified*

$(if theFootnotes theFootnotes) %% returns unspecified if theFootnotes is #f
\myOtherFootnotes

HTH,
  Harm



reply via email to

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