[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: booleans and conditional compilation?
From: |
Urs Liska |
Subject: |
Re: booleans and conditional compilation? |
Date: |
Fri, 01 Apr 2016 21:26:16 +0200 |
User-agent: |
K-9 Mail for Android |
Am 1. April 2016 21:23:17 MESZ, schrieb Johannes Waldmann <address@hidden>:
>Hi.
>
>Is there a standard way of conditional compilation,
>e.g., to turn parts (on any level) of a score on and off?
>
Yes, look up \tag.
HTH
Urs
>From a programmer's standpoint,
>I'd want booleans, and branching, something like
>
>let foo = true % or false, somewhere at the top of the file,
> % or even on the command line
>
>% and then (just to show the idea)
>
>...
><< % (possibly deeply nested)
> { c d
> if foo then e f else c d endif
> g }
> { e f
> if foo then g a else ... endif
> }
>>>
>
>I know I can define variables,
>and then (un)comment the use of the variables,
>but that does not solve my problem
>because then I had to (un)comment all uses of one variable.
>
>I also know I can just use CPP (external preprocessor).
>However that seems like a work-around because lilypond
>has LISP inside and that sure has booleans and conditionals.
>
>Oh, and I looked up "conditional" in the docs
>(D. LilyPond command index) (no results).
>
>
>... Then I looked it up in the mailing list archive, and found
>https://lists.gnu.org/archive/html/lilypond-user/2012-02/msg00786.html
>
>this seems to indicate that I can only switch named parts:
>$(if foo thing) seems to require \thing?
>Then how can I avoid this definition?
>
>
>- J.
>
>Thanks for answers on the "unfold" question.
>
>_______________________________________________
>lilypond-user mailing list
>address@hidden
>https://lists.gnu.org/mailman/listinfo/lilypond-user
--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.