1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_cli/examples/bool_and.code
2018-10-03 17:44:42 -04:00

7 lines
No EOL
216 B
Text

// example using if-then-else-fi with &&
def main(field a, field b) -> (field):
field y = if a + 2 == 3 && a * 2 == 2 then 1 else 0 fi
field z = if y == 1 && 1-y == 0 then y else 1 fi
b == 1
return a