array: can it be returned by a function?

Oliver Hardt hardt at u.arizona.edu
Mon Nov 25 21:08:00 EST 2002


hi david:  here is the code that doesn't work.  the function is 
called from handlers with a tab-separated list of values (the data 
for the array and the keys).  when i trace the function, the local 
var lPPArray appears to be doing fine, however, the calling handler 
doesn't get the array back.  perhaps you could try this out and see 
whether it works ... thanks a lot!  olli.

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



11/26/02, David Vaughan wrote:

>can you reveal some code?



More information about the use-livecode mailing list