3 ms·
It would cause a compile error for do-while loops. And there’s no reason to use `for` here, `while (true)` would do the same (C macros don’t expand recursively
by layer8 5y ago
It would cause a compile error for do-while loops. And there’s no reason to use `for` here, `while (true)` would do the same (C macros don’t expand recursively in such cases).
- Akronymus 5y agoI guess i would go with this in a header file that includes rand.h instead, then: #define while(cond) while ((cond) && rand() >= somesufficientlysmallnumber)