NPR puzzle
Mark Wieder
mwieder at ahsoftware.net
Wed Jul 20 17:56:49 EDT 2005
Alex-
Wednesday, July 20, 2005, 11:55:38 AM, you wrote:
AT> 2. moved the "delete char 1 to 2 of daWord" to after the if test (no
AT> need to delete them if you are about to exit the loop).
Interestingly, the "delete char 1 to 2" approach works slightly faster
than just moving the char pointer. I would have thought that the extra
overhead of deleting chars would be much slower. Apparently the
deletion is handled just by readjusting the start-of-line pointer.
Nonetheless, working from the end of the string ("char -2 to -1") in
the repeat statement and the deletion statement also shaves off a few
milliseconds.
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list