Variable Named Variable Values?

zryip theSlug zryip.theslug at gmail.com
Fri May 16 15:00:55 EDT 2014


Hi Rick,

You can also use the do command:

set the itemdel to "="
repeat for each lines tLine in tVariablesAndDataList
   do "put item 2 of tLine into" && item 1 of tLine
end repeat

where tVariablesAndDataList contains:
VarUserID=“3124"
VarUserName=“John”
VarUserEmail=“John at yahoo.com”

On Fri, May 16, 2014 at 8:32 PM, Rick Harrison
<harrison at all-auctions.com> wrote:
> Hi there,
>
> Ok, so here’s the question.  I’m sure someone has probably
> done this before.  I can’t seem to find the answer, so perhaps
> you can help.
>
> I have a bunch of variable named pair values read in from a file.
> (I do not know the order these values will be coming into from
> the file as they can vary over time.)
>
> The format is:
>
> (Variable Name1)=(Variable Value1)
> (Variable Name2)=(Variable Value2)
> (Variable Name3)=(Variable Value3)
> etc.
>
> Example Data would be:
>
> VarUserID=“3124"
> VarUserName = “John”
> VarUserEmail = “John at yahoo.com> etc.
>
> I’m able to retrieve the name of the variable and the value of the variable into variables.
>
> How do I now assign the values to the original Variable Name by referring to the correct variable name read in?
>
> This is some kind of a double reference possibly referring to contents or the value of a variable, it may involve arrays etc.
>
> Ideas? Suggestions?
>
> Thanks in advance!
>
> Rick
>
>
>
>
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



-- 
Zryip TheSlug
http://www.aslugontheroad.com




More information about the Use-livecode mailing list