array: why does this not work?
dvk at dvkconsult.com.au
Mon Dec 2 02:15:01 EST 2002
On Monday, December 2, 2002, at 05:50 PM, Oliver Hardt wrote:
> hello: i have the following function that basically replaces get
> theArray[theKey]; put it.
> function gF_getA pArray, pKey
> get pArray[pKey]
> return it
> end gF_getA
No problem here. This is a working example of the code I used to test
put empty into field "f1"
-- put empty into field "f2"
put freddo() into frog
repeat for each item i in "a,c,b,d"
put gF_getA(frog,i) & space after field "f1"
put "Freddo" into frog["a"]
put "Frog" into frog["b"]
put "was" into frog["c"]
put "here." into frog["d"]
function gF_getA pArray, pKey
I also tried 1-4 as indices. Everything worked as expected. The output
Freddo was Frog here
Do you have an error in the prior code or in display?
> thank you for your help! best, olli.
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the Use-livecode