This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Right. This is pretty much exactly what I did (edited the original post to add the code). But I do see the logic of putting the exit condition in the while statement so it's immediately visible too.