Can't pass array function result as parameter

J. Landman Gay jacque at hyperactivesw.com
Fri Mar 31 21:59:21 EST 2006


James Spencer wrote:

>> Basically, sometimes you can pass an array and sometimes you can't.
> 
> Thanks Jacque.  This helped and I believe it has to be describing the 
> source of my problem although I haven't completely worked out the 
> semantics for my particular case.  Bottom line, it is not a bug per se 
> but an artifact of how variables work.  (What I will be playing with 
> this weekend is why the "sometimes you can pass an array" doesn't seem 
> to include
> 
> put functionThatReturnsAnArray(tNonArrayParameter) into tArray
> put tArray into tAnotherArray
> handlerThatExpectsAnArray tAnotherArray
> 
> although in all fairness, this may just be me being sloppy in how I 
> tried variations on a theme.

If all else fails, you can always declare a local script variable to 
hold the array and then just use that. No passing of anything required. 
Or you could try passing the variable by reference (add an @ sign in 
front of the parameter) which seems like it should work but I haven't 
tried it.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the Use-livecode mailing list