Zero for Falsity
- Why do we use zero to represent falsity and non-zero numbers to represent truth
- Why do we use zero to represent success and other numbers to represent problems? Does it not just say the opposite of the first rule?
One way to think about these rules is to think about how the math works but personally I prefer to think about them like switches or flags: zero for off, or nothing to report, and non-zero numbers for on, or something found. For the second rule, I think it’s because the question here is not “Is the program running OK?” (then it should have returned 1 for success, for example) but rather “Is there any problem?”