[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scheme function with boolean argument.
From: |
David Kastrup |
Subject: |
Re: Scheme function with boolean argument. |
Date: |
Fri, 11 Apr 2014 14:02:09 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Pierre Perol-Schneider <address@hidden> writes:
> Hi,
>
> I'd like to understand why the following function has no effect :
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \version "2.19.3"
>
>
> myFunctionFalse = \override Score.BarNumber.break-visibility = ##(#f #f #f)
>
> myFunctionTrue = \override Score.BarNumber.break-visibility = ##(#f #t #t)
>
>
> myFunction =
>
> #(define-music-function (parser location arg) (boolean?)
>
> #{
>
> \override Score.BarNumber.break-visibility = ##(#f $arg $arg)
>
> #})
The symbol $arg is likely a mistake, but the symbol arg would not be
better. Please note that #(...) is the syntax for a _constant_ vector.
All its contents are quoted. With #f, this does not make a difference.
But arg remains arg.
So you probably want to write ... = #(vector #f arg arg) instead. That
way arg is not quoted.
--
David Kastrup