Arrays in Rev (long)

Martin Baxter martin at materiaprima.fsnet.co.uk
Mon Jul 12 06:50:45 EDT 2004


>Klaus Major Wrote:
>Does anybody know how to access CPsets/arrays without knowing either
>the arrayname nor the keyname?
>
>I mean the keys can be variables, but can the name also be a variable???
>
>Something like:
>
>...
>put line 1 of fld 2 into array_name
>put line 3 of fld 5 into key_name
>put the array_name[key_name] of this stack
>...
>
>Know what i mean?
>Looks like this does NOT work with IT...
>

Klaus,

Haven't tried that but I wouldn't expect it to work because array_name will
be taken literally.

Instead of your line 3, try :

put "the " & array_name & "[" & key_name & "] of this stack" into
t_elementreference
put value(t_elementreference)


HTH

Martin Baxter




More information about the use-livecode mailing list