Re: Use String to reference Variable

2018-12-04 Thread David Kastrup
Jan-Peter Voigt writes: > Hello Pedro, > > Am 04.12.18 um 04:28 schrieb Pedro Pessoa: >> Hello! >> I want a function that takes a string as arg an from that produces a valid >> variable reference, as follows: >> >> %%% pseudo >> Nabc={a1 d e f} >> Nxyz={b1 e a d} >> >> fun= >>

Re: Use String to reference Variable

2018-12-04 Thread Jan-Peter Voigt
Hello Pedro, Am 04.12.18 um 04:28 schrieb Pedro Pessoa: > Hello! > I want a function that takes a string as arg an from that produces a valid > variable reference, as follows: > > %%% pseudo > Nabc={a1 d e f} > Nxyz={b1 e a d} > > fun= > #(define-music-function (x)(string?) >#{ > << >

Use String to reference Variable

2018-12-03 Thread Pedro Pessoa
Hello! I want a function that takes a string as arg an from that produces a valid variable reference, as follows: %%% pseudo Nabc={a1 d e f} Nxyz={b1 e a d} fun= #(define-music-function (x)(string?) #{ << #(concat x "abc") \\ #(concat x "xyz") >> #}) \fun