array: can it be returned by a function?

Dar Scott dsc at
Mon Nov 25 21:39:01 EST 2002

On Monday, November 25, 2002, at 07:01 PM, Oliver Hardt wrote:

> -- this function gets a tab-separated list of
> -- values (ppData) and a tab-separated list of
> -- keys (ppKeys).  then an array is filled up
> -- with the ppData values and returned
> function gF_LoadPPRec pData,pKeys
>   put empty into lPPArray
>   set the itemDelimiter to tab
>   repeat with i = 1 to the number of items of pKeys
>     put item i of pData into lPPArray[(item i of pKeys)]
>   end repeat
>   return lPPArray
> end gF_LoadPPRec

on mouseUp
   local theArray
   put gF_LoadPPRec(("abc" & tab & "xyz"), ("A" & tab & "B")) into 
   put theArray["A"] && theArray["B"] into field "Report"
end mouseUp

Works for me.  Well, in that trivial case.

Dar Scott
Just learning the power of arrays

More information about the Use-livecode mailing list