Yes, precisely. I'm sticking with the following for now:
#(if (not (defined? 'foo)) (ly:parser-define! 'foo 47))
-
Cheers,
-- Pedro Pessoa
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
___
lilypond-user mailing list
On 29.03.19 12:11, David Kastrup wrote:
Pedro Pessoa 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:
%%%
>
> Probably better get used to below:
>
> #(if (not (defined? 'foo)) (ly:parser-define! 'foo 47))
>
> Cheers,
> Harm
>
Thanks Harm, I gave up on being able to do that long ago.
Vaughan
___
lilypond-user mailing list
lilypond-user@gnu.org
Pedro Pessoa 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
Am Fr., 29. März 2019 um 11:48 Uhr schrieb Aaron Hill
:
>
> On 2019-03-29 3:37 am, Thomas Morley wrote:
> > Am Fr., 29. März 2019 um 10:00 Uhr schrieb Richard Shann
> > :
> >> This sounds like a problem I had when Denemo started running under
> >> Guile 2 - I asked on the guile mailing list and
On 2019-03-29 3:37 am, Thomas Morley wrote:
Am Fr., 29. März 2019 um 10:00 Uhr schrieb Richard Shann
:
This sounds like a problem I had when Denemo started running under
Guile 2 - I asked on the guile mailing list and got fixed up with
this:
;;; for guile 2.0 compatibility define the
Am Fr., 29. März 2019 um 10:00 Uhr schrieb Richard Shann
:
>
> On Thu, 2019-03-28 at 18:22 -0700, Aaron Hill wrote:
> > On 2019-03-28 3:14 pm, Thomas Morley wrote:
> > > Am Do., 28. März 2019 um 22:22 Uhr schrieb Aaron Hill
> > > :
> > > >
> > > > On 2019-03-28 2:18 pm, Valentin Villenave wrote:
>
Am Fr., 29. März 2019 um 02:23 Uhr schrieb Aaron Hill
:
>
> On 2019-03-28 3:14 pm, Thomas Morley wrote:
> > Am Do., 28. März 2019 um 22:22 Uhr schrieb Aaron Hill
> > :
> >>
> >> On 2019-03-28 2:18 pm, Valentin Villenave wrote:
> >> > On 3/28/19, Pedro Pessoa wrote:
> >> >> I imagined something
On Thu, 2019-03-28 at 18:22 -0700, Aaron Hill wrote:
> On 2019-03-28 3:14 pm, Thomas Morley wrote:
> > Am Do., 28. März 2019 um 22:22 Uhr schrieb Aaron Hill
> > :
> > >
> > > On 2019-03-28 2:18 pm, Valentin Villenave wrote:
> > > > On 3/28/19, Pedro Pessoa wrote:
> > > > > I imagined something
On 2019-03-28 3:14 pm, Thomas Morley wrote:
Am Do., 28. März 2019 um 22:22 Uhr schrieb Aaron Hill
:
On 2019-03-28 2:18 pm, Valentin Villenave wrote:
> On 3/28/19, Pedro Pessoa wrote:
>> I imagined something like:
>>
>> %%% pseudo
>> #(define var
>> (not (is-bound? var) 0))
>> %%%
>
> I’d
Thanks, this is it.
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Am Do., 28. März 2019 um 22:22 Uhr schrieb Aaron Hill
:
>
> On 2019-03-28 2:18 pm, Valentin Villenave wrote:
> > On 3/28/19, Pedro Pessoa wrote:
> >> I imagined something like:
> >>
> >> %%% pseudo
> >> #(define var
> >> (not (is-bound? var) 0))
> >> %%%
> >
> > I’d probably probably do
On 2019-03-28 2:18 pm, Valentin Villenave wrote:
On 3/28/19, Pedro Pessoa 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 :-)
(if
On 3/28/19, Pedro Pessoa 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.
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))
%%%
Cheers,
Pedro
15 matches
Mail list logo