Making the move...
sarah.reichelt at gmail.com
Tue Mar 21 21:13:25 CST 2006
I didn't think of that Mark. Again, arrays are things that don't come
naturally to me, so I probably ignore them when they would be useful.
In this case, it sounds like a really good solution.
On 3/22/06, Mark Smith <mark at maseurope.net> wrote:
> You might put the multiple results into the elements of an array, and
> return the array.
> On 22 Mar 2006, at 00:55, Sarah Reichelt wrote:
> > On 3/21/06, Geoff Canyon <gcanyon at inspiredlogic.com> wrote:
> >> Do you have an example? I agree that if you end up passing in a
> >> handful of arguments by reference, you haven't accomplished much by
> >> breaking out the routine. The question is if there isn't a better way
> >> to slice the routine, where that wouldn't be necessary.
> > OK, I have a better example. Say I have a data set and I need to loop
> > through it and extract three different pieces of information e.g. a
> > list of the 4th column in each line, a list of lines that match a
> > certain set of criteria, and a cumulative total obtained by adding a
> > certain column in each line.
> > Each of these could be done in a separate function, but that would
> > mean looping through the data set three times. With a large data set,
> > it is significantly faster to loop once, filling all three new
> > variables in the single loop. If I separate this off into a separate
> > function, then I need a way of passing multiple results back.
> > The alternatives that I see are to use script local variables or to
> > pass an empty parameter by reference and have the function fill it.
> > Does anyone have any other ideas or recommendations?
> > Sarah
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
> 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