Bill Parker is getting voted down, because his definitions are reversed from the normal code convention. Normally, true is defined as 0 and false is defined as nonzero. 1 will work for false, as will 9999 and -1. SameThe same with function return values - 0 is success and anything nonzero is failure. Sorry, I don't have the street credibility yet to vote or to reply to him directly.
Second iteration. Made compliant with the Jon Skeet Decree - <https://twitter.com/PeterMortensen/status/976400000942034944>.
Peter Mortensen
- 31.4k
- 22
- 109
- 132
Added a cross reference. Active reading [<http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29> <https://en.wiktionary.org/wiki/Boolean#Adjective>].
Peter Mortensen
- 31.4k
- 22
- 109
- 132