Peers and Mentors, I have read and been told by a few sources that it is considered "poor" practice to program with a do-while loop. I have found in my time programming that I could always do it with a different loop just as well, and have had VERY little chance to use it. So, between these two concepts (if you buy into them I suppose) I want to know if do-while loop is usually hit upon during the exam? I have fundamental knowledge of it and how to use it, but have many of you certified people out there seen it on the test? Curiosity really drives me ask is all. Thanks, Jason
Joined: Oct 21, 2000
Be assured you may very well get a question on do while loops in the exam. If so concider yourself lucky as it will probably deal with the difference between "while" and "do while" , which brings us to your main point. While it is true that you may never use a do while in one of your programs, it is just as likely that you will thank god for its existance someday. The thing about a do while loop, as you know, is that it is guaranteed to execute once. Even if you say do while false. Use your imagination and you will see how this could be a godsend.