I already pointed out that AR's version is wrong. You can't rely on readline returning EOF or errors more than once.
I thought mine was better than JavaFan's because it lead to the elimination of the duplicate "g()", but that turned out to be a mistake (as per my earlier update).
I still prefer mine over JavaFan's, though. Since mine flows from top to bottom, it requires less skipping around to follow the code.
In reply to Re^4: A way to avoid repeated conditional loops
by ikegami
in thread A way to avoid repeated conditional loops
by Deus Ex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |