Multiline #define madness
Written by Grigory Rechistov in Uncategorized on 20.05.2020. Tags: define, macrodefines,
Like to write multi-line #define
macros but don’t like how the slashes
\\
spoil their look? With the next simple trick of using
/* C-style comments */
, you can achieve the same thing in a beautiful manner.
#include <stdio.h>
#define PRINT_TWICE(x) do { /*
*/ printf( /*
*/ "%s %s\n", /*
*/ (x), (x) /*
*/ ); } while …