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

Joe Lewis Wilkins pepetoo at cox.net
Sat Sep 20 20:21:35 EDT 2008


William, When I needed to do something like this in HC, I'd build a  
string consisting of several comma delimited words/values and return  
that string. Then I'd evaluate the string for what I needed. That  
should work in Rev as well. It's kind of like using an array, I  
suppose. (smile)

HTH

Joe Wilkins
On Sep 20, 2008, at 5:13 PM, william humphrey wrote:

> 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