using pullstime

Can some C/C++ guru describe why x%0 returns x when division by zero is undefined? Is it by design?, or a bug in the compiler?

I am certainly not a guru, but it is the responsibility of the programmer to ensure that division by zero does not occur or if it does to ignore the result.

Lines like

if (buttonPushCounter % 0 == 1)

are just plain wrong, but the OP is just thrashing about as you can see throughout the thread. If he/she ever gets back here I am going to suggest a change that not only corrects the mistake but also considerably reduces the code

I await with bated breathe