2 ms·
Why?!
by BlueTemplar 6y ago
Why?!
- detaro 6y agoBecause its originally error codes. 0 is "all went well", != 0 is an error code telling you why it failed. I'd guess which then got things added like "programA && programB" as "A went well, so do B and check if B goes well", which kinda gives the logic value true to 0.
- BlueTemplar 6y agoRight, should have remembered that from that time I got into C...
- detaro 6y agoAlthough C does map 0 to false, so it really is a shell-ism, despite the return code pattern being used in C and other places.