jorgito11 jorgito11

Niner since 2010


  • Stephan T. Lavavej - Core C++, 8 of n

    The C++ Programming Language, Third Edition, Bjarne Stroustrup

    Section 6.3.3 says, "... In my exprience, the do-statement is a source of errors and confusion. The reason is that its body is always executed once before the condition is evaluated. However, for the body to work correctly, something very much like the condition must hold even the first time through. More often than I would have guessed, I have found that condition not to hold as expected either when the program was first written and tested or later after the code preceeding it has been modified. ... Consequently, I tend to avoid do-statements."