lilypond-user
[Top][All Lists]
Advanced

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

Re: use variable out side procedure


From: Freeman Gilmore
Subject: Re: use variable out side procedure
Date: Fri, 29 May 2020 09:49:59 -0400

I guess i need a text/course book in scheme that explained little
things like that.   That was simple, thank you, ƒg

On Fri, May 29, 2020 at 9:37 AM Valentin Villenave
<valentin@villenave.net> wrote:
>
> On 5/29/20, Freeman Gilmore <freeman.gilmore@gmail.com> wrote:
> > But how do i get Z (or x) out side so i can use the variable?  for example:
> > #(display Z)
>
> You need to define it at the top-level; then you can change its value
> using set!:
>
> %%%%
>
> \version "2.20.0"
> #(use-modules (ice-9 regex))
>
> #(define Z '())
>
> j =
> #(define-void-function
>   (x)
>   (string>?)
>   (set! Z x))
>
> \j "-3     +8  -6+1-8"
>
> #(display Z)
>
> %%%%
>
> Cheers,
> -- V.



reply via email to

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