On 10/11/2015 9:26 PM, dunb...@aol.com wrote:
function findItemLessThanIndex tData,tIndex
    put comma & tIndex after tData
    sort items of tData numeric
    return  item itemOffset("5",tData) -1 of tData
end findItemLessThanIndex

I thought of that too, but it fails if tIndex isn't in the list. The example list was: "1,3,4,7,9" and the target limit was 5.

I couldn't see a way that avoids looping through all the values.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to