lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strings as variable names


From: David Kastrup
Subject: Re: Strings as variable names
Date: Mon, 28 Dec 2015 23:52:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Johan Vromans <address@hidden> writes:

> On Mon, 28 Dec 2015 21:39:05 +0100 (CET)
> Werner LEMBERG <address@hidden> wrote:
>
>> I suggest to use the m4 preprocessor
>> [https://en.wikipedia.org/wiki/M4_(computer_language)] to convert,
>
> Yikes. Speaking of overkill...
>
>> say, `violin1' to `violinI'.  Add the line
>> 
>>   define(`violin1', `violinI')
>
> This will happily change violin12 to violinI2, etc., probably not what you
> want.

    File: m4.info,  Node: Names,  Next: Quoted strings,  Up: Syntax

    3.1 Macro names
    ===============

    A name is any sequence of letters, digits, and the character '_'
    (underscore), where the first character is not a digit.  'm4' will use
    the longest such sequence found in the input.

So, no.

> m4 is not for the faint of the heart.

It's not as bad as you want to paint it.  It would not be my choice of
tool here nevertheless.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]