Error: Due to an error in the Preprocessor is the Operator „mod“ used in Constant-expressions wrong or results in a compiler-crash.

  • Solution: use the custom macro function
Error:
const test = 123 mod 10
Solution:
#define DEF_MOD(a,b) as word( (a) - (b)*word((a) /(b)) ) 
const test = 123 DEF_MOD 10