Daily Shaarli

All links of one day in a single page.

April 4, 2023

CalmCode. Code. Simply. Clearly. Calmly.
thumbnail

Explication de code en Python.

Via : http://links.yome.ch/?FBhkpA

c - do { ... } while (0) — what is it good for? - Stack Overflow
thumbnail

Part1

#define FOO(x) do { foo(x); bar(x); } while (0)
if (condition)
    FOO(x);
else
    ....

Part 2

do {
  // do something
  if (error) {
    break;
  }
  // do something else
  if (error) {
    break;
  }
  // etc..
} while (0);