You've practically designed it! Arrays are your friend.
{ below not tested} function yourFunction arrayVar put Timestamp & tab & "FDSFSDF" into myArray[garbage] put "toad" into myArray[green] return myArray end yourFunction put yourFunction() into Array combine array with return and tab put Array --> garbage<tab>20080923<tab>FDSFSDF green<tab>toad To get the number of elements in an array: number of lines in myArray even better ( I love this one - think binary): repeat for each line tKey in the keys of tArray put tArray[tKey] & return after tArrayContents end repeat to sort: put the keys of myArray into myVariable sort lines of myVariable
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?
-- stephen barncard s a n f r a n c i s c o - - - - - - - - - - - - _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution