lilypond-user
[Top][All Lists]
Advanced

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

Re: Difference between # and $


From: Urs Liska
Subject: Re: Difference between # and $
Date: Mon, 31 Mar 2014 14:22:36 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0

Am 30.03.2014 00:55, schrieb David Kastrup:
Urs Liska <address@hidden> writes:

Hi,

I have a hard time to understand the difference between # and $ in
LilyPond code blocks within Scheme functions.

Same as elsewhere.  Please read

<URL:http://lilypond.org/doc/v2.19/Documentation/extending/lilypond-scheme-syntax>

2.2.1 of the Extending manual says:
"Within LilyPond code blocks, use # to reference function arguments
(eg., ‘#arg1’) or to start an inline Scheme expression containing
function arguments (eg., ‘#(cons arg1 arg2)’). Where normal Scheme
expressions using # don’t do the trick, you might need to revert to
immediate Scheme expressions using $, for example as ‘$music’."

This doesn't really help.

2.1. says:
"... can deal with embedded Scheme expressions starting with $ and #."

This is even less helpful.

Please give me a meaningful explanation of what "immediate Scheme
expressions" are and when and why you should use them.

Those starting with $.  You use them if you need either the copying
action (like when a music expression is used more than once), or when
the parser will not accept an expression starting with # because the
syntax rules will only apply to certain types, requiring the type to be
determined by the lexer already.


Hm, I have to admit I still don't get it.
Somehow I have the impression this is the type of documentation where you have to know the subject before in order to understand the explanation.

Maybe a few examples would be helpful demonstrating both cases?

Best
Urs



reply via email to

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