I have seen some programs or macros using do {} while (0). I think it's quite strange. I don't know why I wrote this, so I am Baidu... I have a good post to share with you! Macro [cpp] # define LFW (x, y) do {x = websGetVar (wp, T (# y), T (""));} while (0) [cpp] _ Api () {do {// do something} while (0);} advantages of using do {} while (0) 1. replace {} to implement local scope. it can also be used in some implementations of C. 2. avoid using GOTO and use break to jump out. when you execute half of the code and want to skip the remaining half, if you are in the do while loop, you can use break for this purpose. The following pseudo code: [cpp] do {I run my execution .. I will execute... If (what conditions have met me) {ah, I want to jump to another piece of code, and the rest will not be executed, but it is not recommended to use the goto statement. What should I do? Break;/* view me */} I may be executed and I may be executed. I may be executed ..} While (false) to jump to this line, isn't break very convenient? Assume that a and B are two C statements respectively, defining an order to execute their Macros in several ways, such as [cpp] # define AB1 a; B; // x, the following statement B cannot be executed: if (cond) AB1; # define AB2 {a; B;} // x. The following statement compilation error occurs: if (cond) AB2; else ...; # define AB3 a, B // x, with operator priority problems # define AB4 do {a; B;} the first few while (0) are problematic, only do while (0) is better solved.