returning result from a function when the number of items in the result varies

william humphrey shoreagent at gmail.com
Sun Sep 21 08:28:31 EDT 2008


Thanks again. I'm still curious about the array. When I use the "number of
lines in myArray" I get the correct answer "1" before I send it out of the
function as "myArray" but when I do the same "number of lines in myArray"
after it is called then the answer is "0".
If I ask for one key in the array (as myArray[1] ) and return that it works
as expected. I understand that the contents of the array are invisible until
I ask for one of the keys. But it still wasn't working as expected. I think
Jim's suggestion might be better as the list of data elements can be handed
back and it will work as I expect.

It was fun to play with the array and I'm surprised that it doesn't return
in the function like a list would as in my mind I think of the array as a
list.



More information about the use-livecode mailing list