mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
17 lines
493 B
Solidity
17 lines
493 B
Solidity
function not(address a) pure suffix returns (bytes20) {
|
|
return ~bytes20(a);
|
|
}
|
|
|
|
contract C {
|
|
function notMin() public pure returns (bytes20) {
|
|
return 0x0000000000000000000000000000000000000000 not;
|
|
}
|
|
|
|
function notMax() public pure returns (bytes20) {
|
|
return 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF not;
|
|
}
|
|
}
|
|
// ----
|
|
// notMin() -> 0xffffffffffffffffffffffffffffffffffffffff000000000000000000000000
|
|
// notMax() -> 0x0000000000000000000000000000000000000000
|