lilypond-devel
[Top][All Lists]
Advanced

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

music identifier scopes


From: Nicolas Sceaux
Subject: music identifier scopes
Date: Thu, 22 Apr 2004 20:38:16 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Hello,
With current CVS, the following file issues an guile error:

%%% bar.ly:
foo=\notes { c' d' e' }
#(display foo)
\score { \notes { \foo }}
%%%

address@hidden: lilypond /home/nicolas/tmp/bar.ly
...
/home/nicolas/tmp/bar.ly:1:1: While evaluating arguments to display in 
expression (display foo):
/home/nicolas/tmp/bar.ly:1:1: Unbound variable: foo

However, if I change the file:

%%% bar2.ly:
foo=\notes { c' d' e' }
#(define-module (*anonymous-ly-1*))
#(display foo)
\score { \notes { \foo }}
%%%

then `foo' becomes accessible from top-level.
This is not understandable to me, since (*anonymous-ly-1*) seems to be
in both case the current-module...

Anyway, this is strange.

Nicolas

PS: thanks from ly:parse-string !!!





reply via email to

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