> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of rand
> valentine
> Sent: Sunday, November 02, 2003 12:19 PM
> To: [EMAIL PROTECTED]
> Subject: referencing arrays
>
>
> Hi, I have a simple question, and my apologies to the gurus for
> taking your time -- i still can't search the archives.
>
> I have a set of arrays, titled arrayN, arrayV, arrayA
>
> I want to be able to build the name of the array I need to refer to
> on the fly, e.g.,
>
> put "array" & "N" into theArrayName
>
> put theArrayName["@"]
>
> this does not work -- using a variable for the name of the array
> causes the array not to be properly referenced. What am I doing wrong,
> or what can one do to actually build an array reference of this sort
> that works?
One approach:
get ("put array" & tSomeCharacter & "[" & tKeyValue & "] into tValue")
do it
-- now tValue contains the value pulled from arrayN[x]
Another version of this approach:
put arrayValue("N",tKeyValue) into tMyValue
...
...
function arrayValue pArraySuffix, pArrayKey
get ("put array" & pArraySuffix & "[" & pArrayKey & "] into tValue")
do it
return tValue
end arrayValue
Hope this helps.
Phil Davis
>
> rand valentine
>
> _______________________________________________
> use-revolution mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution