[sc-users] .interpret
James Harkins
jamshark70 at gmail.com
Fri Dec 8 14:11:17 PST 2006
Can you say more about what you're trying to do?
People often think .interpret is a catchall for programming problems,
but usually it indicates that you're trying to go about something in
the wrong way.
hjh
On 12/8/06, koonce at grove.ufl.edu <koonce at grove.ufl.edu> wrote:
>
>
> Can someone tell me the trick to doing something like this:
>
> (
>
> a = \c ;
>
> b = a.asString ++ " = 1 " ;
>
> b.interpret ;
>
> c.postln ;
>
> )
>
>
> which works, but using declared variables instead, like the following:
>
> (
> var mySymbol ;
>
> a = \mySymbol ;
>
> b = a.asString ++ " = 1 " ;
>
> b.interpret ;
>
> mySymbol.postln ;
>
> )
>
> which seems to fail to compile the interpreted string with the variable
> declared outside, I guess. (See error below.)
>
>
> ERROR: Variable 'mySymbol' not defined.
> in file 'selected text'
> line 1 char 16 :
> mySymbol = 1
> -----------------------------------
> nil
> nil
>
--
James Harkins /// dewdrop world
jamshark70 at dewdrop-world.net
http://www.dewdrop-world.net
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman
More information about the sc-users
mailing list