"Phil Holmes" <m...@philholmes.net> writes: > ----- Original Message ----- > From: "David Kastrup" <d...@gnu.org> > To: "Johan Vromans" <jvrom...@squirrel.nl> > Cc: <lilypond-user@gnu.org> > 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 = aaa + 1 >> print ( bbb ) >> aaa = 5 >> print ( bbb ) >> >> I know of no programming language which will output 6 the second time >> round. You are not thinking of a variable, but of a parametric >> procedure. > > IIRC metafont does something of this sort. mf This is METAFONT, Version 2.718281 (TeX Live 2013/Debian) **\relax
*aaa := 3; bbb = aaa + 1; show bbb; * *>> 4 *aaa := 5; show bbb; *>> 4 * It takes care when reassigning values to a variable to _first_ make the existing expressions independent from the respective variable. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user