Re: Variables as variables

2014-01-20 Thread Johan Vromans
Janek Warchoł writes: > I think this snippet may be interesting to you > https://github.com/openlilylib/snippets/blob/master/input-shorthands/late-evaluation-of-variables.ly It is, indeed... Thanks! Now, why can this snippet not be found when searching for "lazy evaluation" and "late evaluation

Re: Variables as variables

2014-01-20 Thread Johan Vromans
Josiah Boothby writes: > Would not a more canonical way be to use tags? Not as elegant maybe, > but: > > aaa = { > \tag #'first { c4 d e f } > \tag #'second { f4 e d c } > } > > bbb = { > a4 a a a > s4*4 > b4 b b b > } > > \score { << \bbb { s4*4 \keepWithTag #'first \aaa } >> } >

Re: Variables as variables

2014-01-20 Thread Josiah Boothby
On Mon, 20 Jan 2014 16:00:59 +0100 Johan Vromans wrote: > Now I want to re-use bbb with a different value of aaa. Like a real > variable as known from other programming languages. > > aaa = { c4 d e f } > bbb = { a4 a a a \aaa b4 b b b } > \score { \bbb }% a4 a a a c4 d e f b4 b b b >

Re: Variables as variables

2014-01-20 Thread Janek Warchoł
2014/1/20 Johan Vromans : > In LilyPond terms, in > > namedMusic = { ... } > > 'namedMusic' is called a variable, identifier or macro. > > Normal LilyPond behaviour is > > aaa = { c4 d e f } > bbb = { a4 a a a \aaa b4 b b b } > \score { \bbb } > > This produces { a4 a a a c4 d e f b4 b b b

Re: Variables as variables

2014-01-20 Thread David Kastrup
"Phil Holmes" writes: > - Original Message - > From: "David Kastrup" > To: "Johan Vromans" > Cc: > Sent: Monday, January 20, 2014 3:23 PM > Subject: Re: Variables as variables > > > >> That's not "like

Re: Variables as variables

2014-01-20 Thread Phil Holmes
- Original Message - From: "David Kastrup" To: "Johan Vromans" Cc: Sent: Monday, January 20, 2014 3:23 PM Subject: Re: Variables as variables That's not "like a real variable as known from other programming language". If I write aaa = 3 bbb =

Re: Variables as variables

2014-01-20 Thread David Kastrup
Johan Vromans writes: > In LilyPond terms, in > > namedMusic = { ... } > > 'namedMusic' is called a variable, identifier or macro. > > Normal LilyPond behaviour is > > aaa = { c4 d e f } > bbb = { a4 a a a \aaa b4 b b b } > \score { \bbb } > > This produces { a4 a a a c4 d e f b4 b b b }

Variables as variables

2014-01-20 Thread Johan Vromans
In LilyPond terms, in namedMusic = { ... } 'namedMusic' is called a variable, identifier or macro. Normal LilyPond behaviour is aaa = { c4 d e f } bbb = { a4 a a a \aaa b4 b b b } \score { \bbb } This produces { a4 a a a c4 d e f b4 b b b } . Now I want to re-use bbb with a different