Ian Hulin <i...@hulin.org.uk> writes:

> Hi David,
> On 09/12/11 12:55, lilyp...@googlecode.com wrote:
>> 
>> Comment #2 on issue 2072 by d...@gnu.org: Add proper complex
>> variables to Lilypond 
>> http://code.google.com/p/lilypond/issues/detail?id=2072
>> 
>> After thinking about it, assignments are possible only in contexts
>> where strings can't occur by themselves. So it should actually be
>> possible to use the syntax violin1 = { ... } or less covert
>> variants of specifying 1.
>> 
>> Of course, only after having declared violin as an array.
> Two questions:
> Which problem are we solving here, numbers as valid characters in Lily
> identifiers,

More the problem of users asking for them.  They just don't know what
they really want(TM) or would not dare asking for.

> or providing some sort of arrays/vectors/subscripted variables
> facility in Lily?  If it's the latter, how would we "declare violin as
> an array"?

> Maybe \array violin 2 and access it as violin[1] = {...}
> violin[2] = {...}

Huh?  I already described the access syntax.  The definition would be
something like

violin = \vector 2

violin1 = {...}

violin2 = {...}

with you being free to write

violin #(+ 3 2) = {...}

or similar instead for the definition and

\violin #(+ 1 2)

for use.

Or
sonata = \vector 2
sonata1 = \struct #'(expo modulation reprise)
sonata1 #'expo = { ... }
sonata1 #'modulation = { ... }
sonata1 #'reprise = { ... }

Something like that.

-- 
David Kastrup


_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to