2 ms·
How so? If the character is any value less than '0' (say, '!'), p will be set to a negative value.
by comex 15y ago
How so? If the character is any value less than '0' (say, '!'), p will be set to a negative value.
- 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.