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


"Phil Holmes" <[email protected]> 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

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to