Thoughts on unified integer literal improvements
pbenedict at apache.org
Thu May 28 00:47:34 PDT 2009
Thanks Mark :-) Then I believe the 'u' suffix is more straightforward.
I can mentally make the connection that 'u' means an 'unsigned'
literal. I prefer that over any other letter suffix.
byte b1 = 0xFFu; // you get -127
On Thu, May 28, 2009 at 2:35 AM, Mark Thornton wrote:
> Because 0xFF is equivalent to 255 which is outside the range of byte.
> Compare with
> byte b1 = 0xFFFFFFFF;
> It is a consequence of the (unfortunate) choice of bytes as signed.
> Paul Benedict wrote:
>> byte b1 = 0xFF;
>> byte b2 = 3;
>> Can someone explain to me why this shouldn't straight compile?
More information about the coin-dev