Boolean or example
This commit is contained in:
parent
2082814162
commit
3dfa7d73a5
1 changed files with 7 additions and 0 deletions
7
zokrates_cli/examples/bool_or.code
Normal file
7
zokrates_cli/examples/bool_or.code
Normal file
|
@ -0,0 +1,7 @@
|
|||
// example using if-then-else-fi with ||
|
||||
def main(field a, field b) -> (field):
|
||||
field y = if x + 2 == 4 || x * 2 == 2 then 1 else 0 fi
|
||||
field z = if y == 1 || y == 0 then y else 1
|
||||
z == 1
|
||||
return z
|
||||
|
Loading…
Reference in a new issue