|
|
GNU LilyPondWelcome to the home of the GNU Music Typesetter |
||||||||||
|
Node:Assignments, Next:Lexical modes, Previous:Manipulating music expressions, Up:Syntactic details AssignmentsIdentifiers allow objects to be assigned to names during the parse
stage. To assign an identifier, you use name An identifier can be created with any string for its name, but you will only be able to refer to identifiers whose names begin with a letter, being entirely alphabetical. It is impossible to refer to an identifier whose name is the same as the name of a keyword. The right hand side of an identifier assignment is parsed completely
before the assignment is done, so it is allowed to redefine an
identifier in terms of its old value, e.g.
foo = \foo * 2.0 When an identifier is referenced, the information it points to is
copied. For this reason, an identifier reference must always be the
first item in a block.
\paper {
foo = 1.0
\paperIdent % wrong and invalid
}
\paper {
\paperIdent % correct
foo = 1.0 }
|
||||||||||
|
Go back to index of LilyPond.
Please send GNU LilyPond questions and comments to lilypond-user@gnu.org. Please send comments on these web pages to lilypond@packages.debian.org Copyright (c) 1997--2001 Han-Wen Nienhuys and Jan Nieuwenhuizen. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. |
|||||||||||
This page was built from LilyPond-1.4.12 (stable-branch) by