> repeat with i = 1 to nb/2 > tmp = theList[i] > theList[i] = theList[nb+1-i] > theList[nb+1-i] = tmp > end repeat >end > >This one using just one list: memory economy and is faster than colin's (for >a list of 10 elements, Colin's algorithm is doing 20 operations, mine's >doing only 15).
I'm not so sure about your 20/15 comparison. In mine I was doing an append of a get, in effect, which for a six element list is 12 operations. In yours you're doing a get, then a set of another get, followed by another set. You do that for half the list amount, but it still totals 12 operations. -- [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
