Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
while (1) vs. for ( ;; )
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Baxter, post: 2426282"] Why not code it like you would read it in English: bool done = false; while (!done) { // while not done do ... bool mainloop = true; while (mainloop) { // while mainloop do ... You can further document it like this: while (!done) { // will never be done while computer is running ... There's many variations on this: #define NOTDONE 1 ... while (NOTDONE) { ... Convey your intent in English (assuming English is your first language) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
while (1) vs. for ( ;; )
Top