<HTML>
<HEAD>
<TITLE>Setting variable variables</TITLE>
</HEAD>
<BODY>
<FONT FACE="Monaco">Is it possible to create variables from a retrieved list, such as setting the following:<BR>
<BR>
Newly retrieved list:<BR>
<BR>
nameList = {"prodNum", "prodPrice"}<BR>
valueList = {"abc123", "$49.95"}<BR>
<BR>
Set two new variables based on the above strings:<BR>
<BR>
Local (nameList[1] = 1, nameList[2] = 2)<BR>
<BR>
I want to create and way of dynamically setting offsets in list so I can refer to them by name verses hard coded offset position as well as the next time I get my lists, they may have changed (ie. Reversed or more items ==> nameList = {"prodPice", "prodNum", "introDate"}<BR>
<BR>
price = valueList[prodPrice]<BR>
<BR>
verses <BR>
<BR>
price = valueList[2]<BR>
<BR>
The evaluate verb doesn't work for me (either it can't or I can't figure it out). If this can't be done this way, is there another methodology which accomplishes what I want – dynamically determined offsets referable to by easy to understand variable names?<BR>
<BR>
Thanks,<BR>
<BR>
Matt<BR>
<BR>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>
<BR>
</FONT>
</BODY>
</HTML>