lilypond-user
[Top][All Lists]
Advanced

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

Re: Difference between # and $


From: Phil Holmes
Subject: Re: Difference between # and $
Date: Mon, 31 Mar 2014 14:53:01 +0100

----- Original Message ----- From: "David Kastrup" <address@hidden>
To: "Phil Holmes" <address@hidden>
Cc: "Urs Liska" <address@hidden>; <address@hidden>
Sent: Monday, March 31, 2014 2:44 PM
Subject: Re: Difference between # and $


"Phil Holmes" <address@hidden> writes:

I've read
http://lilypond.org/doc/v2.19/Documentation/extending/lilypond-scheme-syntax
(as no doubt, Urs has) and tried to use $ in place of #.  Can't get it
to compile.  So, taking the following note doubler, how would $ be
used instead of #?

dubble = #(define-music-function( parser location arg )
 (ly:music?)
 #{ $arg $arg #}
)

{ c'' \dubble c' }

Huh?  Which # would you even want to replace here?  #{ ... #} is inside
of Scheme.  $arg already uses a $.

This code works fine as written.

Er - yes. I know it works fine. I ran it. However, the page I refer to above says "Another way to call the Scheme interpreter from LilyPond is the use of dollar $ instead of a hash mark for introducing Scheme expressions". So my presumption was that "#(define-music-function" is "a hash mark for introducing Scheme expressions" and could be replaced by a $. But if I do that, it fails to compile.

--
Phil Holmes



reply via email to

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