Quote Originally Posted by xSmiley View Post
Cornedbee, thank you for a more concise version of the function. If I understand correctly, the do...while loop is more efficient than a while loop? Is this because the do..while executes the loop once and then checks to go on, instead of checking every-time before executing, as the while loop does?
It might be more efficient in this particular case, but what's important is that the code has lower complexity. It's easier to read (if you know how do...while works, at least). Efficiency on this low level is irrelevant; the compiler will know what to do.