I often see function names or comments suggesting that some boolean variable or bit is being “reset”.
When I see the term “reset” being used instead of some more definitive term like “set” or “clear” I am tempted to think that the variable is being brought to some original state, so it may be either a “set” or a “clear”, depending on how the original state was defined.
However, examination of what the code actually does invariably shows that if it is a boolean variable, it is being set to “false”, while if it is a bit, it is being set to 0. So, the value is always “cleared”. Then again, this might only be because so far I have only happened to examine cases where the “original” value was indeed false or 0.
So, does “reset” always mean “clear”?
(And if yes, then why do people often say “reset” instead of “clear”?)