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: Valentin Villenave
Subject: Re: use variable out side procedure
Date: Fri, 29 May 2020 15:37:25 +0200

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]