Graham Percival <[email protected]> writes: > On Sat, Mar 12, 2011 at 03:00:41PM +0100, David Kastrup wrote: >> David Kastrup <[email protected]> writes: >> >> > Here is one example where -3 and -13 do totally different things: >> > >> > >> > xxxx=-3 >> > yyyy=-13 >> > #(display xxxx) >> > #(display yyyy) >> >> Incidentally: does anybody have a reasonable idea how we want to get >> around this? > > completely untested: > yyyy = -1.0 * 13 > ? :)
-13 is no problem. -3 is... > The serious answer is to add # in front of all numbers; we started > doing this in the docs back in 2007. You mean, not allowing numbers at all in contexts where they could be confused with fingerings? Rather than just not allowing one-digit negative numbers? >> Currently it would appear impossible to assign one-digit negative >> numbers to variables since they are instead interpreted as fingerings. >> >> That seems like a rather appalling deficiency in the syntax. > > Oh, agreed. I think we should remove the DIGIT stuff. It does seem to cause some peculiarities. The question is what other peculiarities we are buying ourselves instead. Here are some amusing thoughts: xxx=-5 # assign -5 to xxx c-\xxx # equivalent to c-5 The idea here would be to make -\xxx where \xxx is a numeric identifier equivalent to using -\xxx as a fingering. That would have the quirky consequence of xxx=5 c-\xxx generate a fingering with a value of -5. It would likely resolve the current situation, meaning current inputs that are intended to be valid would remain or become so. there is a possibility that this is "too cute". -- David Kastrup _______________________________________________ lilypond-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-devel
