How to use do {} while(0);

This is going to be a very brief tutorial, but hopefully it is still useful.

Let's start off with some structure:

1do
2{
3  // Insert code here.
4} while(0);

You should already be familiar with do { /*insert code*/ } while(/*condition*/); but if not, I'll give you a brief explanation. Basically, the code inside the body of the do statement will be executed as long as the condition of the while statement is true.  more...

No comments:

Post a Comment