lilypond-user
[Top][All Lists]
Advanced

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

Re: Optional arguments


From: David Kastrup
Subject: Re: Optional arguments
Date: Thu, 06 Mar 2014 21:15:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Paul Morris <address@hidden> writes:

> Hello all,
> I have a question about how to use optional arguments in scheme functions. 
> In my tiny example below I want to be able to leave out the 3rd argument,
> but then LilyPond takes the 2nd \makeScore as the 3rd argument (which
> doesn't work).  I'm just curious to learn how to do this assuming there is a
> way.  I can always just enter "" or \default for the 3rd argument (but then
> is it really optional?).

The last argument of a function is never "really" optional (the only way
to get the default value is by writing \default).

> Relevant docs:
> http://lilypond.org/doc/v2.19/Documentation/extending/scheme-function-definitions

The next one tells the story about optional arguments:
<URL:http://lilypond.org/doc/v2.19/Documentation/extending/scheme-function-usage>

-- 
David Kastrup



reply via email to

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