Help with Arrays??
mark at maseurope.net
Tue Mar 21 05:49:24 EST 2006
Wow. The following meaningless script fails, (though it doesn't
produce an error) ie. the result is simply 12 in the message box, the
keys of the array are not sent to the message box...
on showArray 12,tArray
put x & cr & the keys of tArray
function makeArray x
repeat with n = 1 to x
put 0 into tArray[n]
put makeArray(12) into tArray
works just fine...
Maybe this is a bug. Anyone else come across this?
On 21 Mar 2006, at 07:39, Arthur Urban wrote:
> I don't know what the heck is going on here, but I know it's making
> me a wee bit testy. (I don't like needless local variables, what
> can I say...)
> Here's the code that works just fine. Please note that I've
> confirmed the value of x, it is not the problem here. The function
> returns an Array.
> put MyFunc( x ) into theArray
> DisplayPurchaseLine x, theArray
> The following code fails miserably passing empty for theArray
> argument; x is passed in just fine:
> DisplayPurchaseLine x, MyFunc( x )
> Why do I need to put the MyFunc() return value (an array) into a
> local variable first. It clearly makes it out of the function call,
> but cannot then immediately be used as a parameter. Huh?
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode