Thanks Jean! I need to read more carefully!

On Mon, Oct 19, 2020 at 5:45 PM Jean Abou Samra <j...@abou-samra.fr> wrote:

>
> Le 19/10/2020 à 23:14, Dave Seidel a écrit :
>
> Hi all,
>
> I am trying to define a variable on the command line that I can use within
> the .ly file. I've tried both
>
> -e "(define-public part 1)"
>
> and
>
> -e "(define part 1)"
>
>
> In the .ly file, I have a Scheme expression
>
> #(if (= part 0)
>   (define partName "")
>   (define partName (string-append "S" part))
> )
>
>
> In either case, I get the error
>
> GUILE signaled an error for the expression beginning here
> #
>  (if (= part 0)
> Unbound variable: part
>
>
> I guess I'm either defining the variable incorrectly, or dereferencing it
> incorrectly within the script. Can someone help?
>
> Thanks,
>
> Dave
>
>
> Hi,
>
> Have a look at
>
>
> lilypond.org/doc/v2.21/Documentation/usage/command_002dline-usage#basic-command-line-options-for-lilypond.html
>
> You need
>
> #(use-modules (guile-user))
>
> at the top of your LilyPond source.
>
> You can ignore the warning that shows up 
> (https://gitlab.com/lilypond/lilypond/-/issues/3613).
>
> Best,
> Jean
>
>

Reply via email to