Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In C at least, pushbutton could be strictly greater than one and still be treated as true, but that would be a different result in the arithmetic versions of the statement. It could be made identical by using "!!pushbutton".


I think you might be taking what was intended to be a simple example a little too far.

That said, "pushbutton" could very well be limited to the values 0 and 1 during the keypad scanning, debouncing and decoding code.

Chill bro.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: