You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
822 B
47 lines
822 B
4 years ago
|
pragma solidity ^0.7.0;
|
||
5 years ago
|
|
||
|
|
||
4 years ago
|
contract Contract_OR {
|
||
5 years ago
|
|
||
|
function _if(uint i) public pure {
|
||
|
if (i == 0 || i > 5){
|
||
|
/* ignore */
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function _if_and(uint i) public pure {
|
||
|
if (i != 0 && (i < 2 || i > 5)){
|
||
|
/* ignore */
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function _return(uint i) public pure returns (bool){
|
||
|
return (i != 0 && i != 1 ) ||
|
||
|
((i + 1) == 2);
|
||
|
}
|
||
|
|
||
|
function _while(uint i) public pure returns (bool){
|
||
|
uint counter;
|
||
|
while( (i == 1 || i == 2) && counter < 2 ){
|
||
|
counter++;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function _require(uint x) public {
|
||
|
require(x == 1 || x == 2);
|
||
|
}
|
||
|
|
||
|
function _require_multi_line(uint x) public {
|
||
|
require(
|
||
|
(x == 1 || x == 2) ||
|
||
|
x == 3
|
||
|
);
|
||
|
}
|
||
4 years ago
|
|
||
|
function _if_neither(uint i) public {
|
||
|
if (i == 1 || i == 2){
|
||
|
/* ignore */
|
||
|
}
|
||
|
}
|
||
5 years ago
|
}
|