uint8 x = 255;
x += 10;
Is x going to be 0 or 9?
uint8 x = 255;
x += 10;
Is x going to be 0 or 9?
x will be 9.
Use this code and How to quickly test a Solidity function?
contract C {
function test() returns(uint) {
uint8 x = 255;
x += 10;
return x;
}
}
Decoded: uint256: 9