ok thank you.
Does any of this matter much though ? I'm confused about why I have a do/while when if I was wringting it into my program I'd not have to.
If you write the code just for yourself, it doesn't matter. But using the do/while-wrapper the macro can be used as an ordinary statement, so it is considered as a good programming practice.
For example, you can use the macro in the if-statement without problems:
if (some expression)
your_macro();
as the macro will be expanded as follows:
if (some expression)
do {
stmt1;
stmt2;
stmt3;
} while 0;
But, without the do/while-wrapper the result will be quite different:
if (some expression)
stmt1;
stmt2;
stmt3;
which is not what you intended, but it will compile without any problems, though.