contract byt { bytes2 sm = 0x5b33; function plus256 public returns(bytes3) { return sm;//returns 0x5b3300 } function isPlus256 public returns(bool) { return 0x5b0000/(256*256) == sm; } function plus256 public returns(bytes2) { return sm;//error } }
uint跟int的极限
代码:
1 2 3 4
int minInt = type(int).min; int maxInt = type(int).max; uint minU = type(uint).min; uint maxU = type(uint).max;