[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Generating symbols from strings
From: |
Paul Morris |
Subject: |
Re: Generating symbols from strings |
Date: |
Thu, 25 Sep 2014 19:49:54 -0700 (PDT) |
Jay Vara wrote
> In the following program, I set xyz to the variable abc using scheme
> string->symbol as well as the usual \abc.
>
> Instead of giving the same value for xyz, the first one sets it to string
> "abc" and the second sets it to value of abc.
>
> What do I need to modify in the assignment of string->symbol to get it to
> be equivalent to xyz = \abc
Hi Jay, You don't need to use string->symbol to do this.
#abc will return the value of abc (the string IamJustAText), just like \abc
does.
HTH,
-Paul
\version "2.18.2"
abc = IamJustAText
xyz = #abc
#(format #t "2) abc ~a xyz ~a ~%" abc xyz)
xyz = \abc
#(format #t "2) abc ~a xyz ~a ~%" abc xyz)
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Generating-symbols-from-strings-tp166813p166815.html
Sent from the User mailing list archive at Nabble.com.