lilypond-user
[Top][All Lists]
Advanced

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

Re: Is there an equivalent of #define ... #ifndef ... #endif in lilypond


From: Helge Kruse
Subject: Re: Is there an equivalent of #define ... #ifndef ... #endif in lilypond?
Date: Mon, 20 Feb 2012 07:26:05 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Am 19.02.2012 11:48, schrieb Michael Hendry:

> So it would be:
>
> #define debugging
>
> ... several pages of code ...
>
> #ifdef debugging
> ... print something on the screen, and await a user response ...
> #endif
>
> ... several more pages of code ...
>
> #ifdef debugging
> ... do something else that's useful in the debugging process ...
> #endif
>
> ... and so on ...
>
>
> I envisage a series of #define statements at the head of the main .ly file
> such as:
>
> #define concert_part
> #define guitar_part
> #undef alto_part
> #define clarinet_part

Ok, if you want to use the C preprocessor syntax, you can just use the C preprocessor. Add a short script the passes your source file through the C preprocessor to a temporary file and start Lilypond with that file.

If you just don't have your C compiler at the PC you can use a preprocessor implementation like this: http://mcpp.sourceforge.net/


Helge



reply via email to

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