while (numChar--) {
buffer[index++] = Serial.read();
}
The code above is a snippet from the ASKManual Version 5.
The author explains it as such:
"The condition it is checking is simply numChar, so in
other words it is checking that the value stored in the
integer numChar is not zero"
I do not see any where that the condition of "not zero" is being checked. I see only the decrement. Shouldn't there be something like !=0. ??
The value of numchar is tested for true/false before the (post-)decrement takes place. It isn't necessary to assign the value of an expression in order to examine it.