Alex- The problem with things like mod and "/" is that they're expensive in terms of scaling: they're about 3.5 times slower than "last char". If you're just doing this once, it shouldn't matter much. But if you need to determine oddness in a loop you want to do as much processing outside the loop as possible.
Here's the fastest I could come up with... constant kEven="02468" put 3.14169 into tValue -- do this outside the loop put trunc(tValue) into y put the milliseconds into x repeat 10000 times -- this line is slow -- put the last char of trunc(y) is in kEven into tIsEven -- much faster put the last char of y is in kEven into tIsEven end repeat put the milliseconds -x -- -Mark Wieder mwie...@ahsoftware.net _______________________________________________ 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