Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#FFCCCC
langc
#define INCREMENTINCREMOD(x, max) ((x) = ((x) + 1) % (max));

int index = 0;
int value;
value = INCREMENTINCREMOD(index, 10) + 2;
/* ... */

...

Code Block
bgColor#CCCCFF
langc
#define INCREMENTINCREMOD(x, max) ((x) = ((x) + 1) % (max))

...

Code Block
bgColor#CCCCFF
langc
inline int incrementincremod(int *x, int max) {*x = (*x + 1) % max;}

...