:w is vi's save ("write") command. He must have tried to save while in edit mode.What is the meaning of :w in the code?
Why are you modifying $try? It always gets assigned from int(($lo + $hi)/2) at the top of the loop.
Yes, but $hi or $lo changes in every loop pass.
In reply to Re^2: Binary search algorithm.
by ikegami
in thread Binary search algorithm.
by kindlychung
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |