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: David Kastrup
Subject: Re: Define variable only if it doesn't exist / is unbound
Date: Fri, 29 Mar 2019 12:11:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Pedro Pessoa <address@hidden> writes:

> Hello,
> I want to init a variable only if it isn't bound. This seems a simple
> matter, I was surpised I couldn't do it.
> The thing is that it throws an 'unbound variable error' with anything I try.
> I imagined something like:
>
> %%% pseudo
> #(define var
>     (not (is-bound? var) 0))
> %%%

var = 0

Does it need to be in Scheme?

-- 
David Kastrup



reply via email to

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