LC equivalent of the JS eval() function
Slava Paperno
slava at lexiconbridge.com
Sun Jul 24 12:10:18 EDT 2011
I'm looking for the LC equivalent to the JavaScript eval() function. For
example, if I have a variable called "tAddress" and I want an LC statement
to assign a value to it, I'd like to say something like put "202 Main
Street" into eval("tAddress").
That may sound silly because if I, the programmer, know the name of the
variable, I should say put "202 Main Street" into tAddress. But I don't know
the name of the variable because it will be generated by a handler. For
example, if my handler reads a name-value pair from some file:
LastKnownAddress="202 Main Street"
then I want to create a variable called LastKnownAddress and set its value
to "202 Main Street".
In JS, I would use eval(). What can I use in LC? It's hard to find things
like that in the docs when you don't know what they are called.
Thanks!
Slava
More information about the use-livecode
mailing list