Arrays in Rev (long)

Klaus Major klaus at major-k.de
Mon Jul 12 07:34:04 EDT 2004


Hi Martin,

>> 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)

Thanks a lot, this works great :-)

I knew it had something to do with "value", but apparently tried the 
wrong approach ;-)

> HTH
>
> Martin Baxter

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list