4 ms·
'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/qAKG9j5
by BarkMore 15y ago
'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 http://play.golang.org/p/qAKG9j5E4V
All characters have values greater than or equal to zero.
- Dylan16807 15y agocomex said less than '0'. 33 minus 48 is negative.