lilypond-user
[Top][All Lists]
Advanced

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

Re: Define variable only if it doesn't exist / is unbound


From: Valentin Villenave
Subject: Re: Define variable only if it doesn't exist / is unbound
Date: Thu, 28 Mar 2019 22:18:01 +0100

On 3/28/19, Pedro Pessoa <address@hidden> wrote:
> I imagined something like:
>
> %%% pseudo
> #(define var
>     (not (is-bound? var) 0))
> %%%

I’d probably probably do something like

(null? (ly:parser-lookup 'var))

But I’m sure there are better ways :-)

Cheers,
V.



reply via email to

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