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

'0' has the decimal value 48, not zero. '!' has the decimal value 33. Here's a demo program that you can run from your browser: http://play.golang.org/p/qAKG9j5E4V

All characters have values greater than or equal to zero.



comex said less than '0'. 33 minus 48 is negative.




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

Search: