mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
17 lines
304 B
Solidity
17 lines
304 B
Solidity
function not(bool a) pure suffix returns (bool) {
|
|
return !a;
|
|
}
|
|
|
|
contract C {
|
|
function notTrue() public pure returns (bool) {
|
|
return true not;
|
|
}
|
|
|
|
function notFalse() public pure returns (bool) {
|
|
return false not;
|
|
}
|
|
}
|
|
// ----
|
|
// notTrue() -> false
|
|
// notFalse() -> true
|