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

william humphrey shoreagent at gmail.com
Sat Sep 20 20:13:35 EDT 2008


I'm having trouble sorting this out. I have a function that searches through
lines of tab delimited text. The number of lines varies from one to ten. The
result from the search is two things. A data element and a pointer that says
which kind of data element. Sometimes the result is one data element and one
pointer and sometimes the result is another quantity like three data
elements each with their identifier. To have this returned by the function
it seems I need an array. I'm inexperienced at using arrays but I imagine
that you just build it in the function and that is what is returned and then
the identifiers for each data element are the keys and it makes no
difference how many lines are in the array? Perhaps I also return a counter
which says how many lines of data are in the array?



More information about the use-livecode mailing list