For the first time I find myself using sorted lists. I haven't done any benchmarking, but I suspect they may be faster to access under certain circumstances. (Anyone want to check? I can't be bothered.) I'm actually using them for reasons other than performance, so any performance gains are just a bonus for me, but I discovered this curiosity;
b = [1,256,999] sort b put b.findposNear(1000) -- 4 (Observed in D7 and D8 on Mac.) Quite useful perhaps, if this is the expected behavior. (You can find out very quickly whether the value is 'too big'). Unfortunately 'too small' values always return 1 rather than something else. put b.findposNear(-1) -- 1 Just to make the point even clearer: put b.findposNear(999.00001) -- 4 Can anyone explain the thinking behind this? -Brennan [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/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!]
