1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_cli/examples/arrays/boolean_array.zok

9 lines
223 B
Text

def main(bool[3] a) -> (field[3]):
bool[3] c = [true, true || false, true]
a[1] = true || a[2]
a[2] = a[0]
field[3] result = [0; 3]
for field i in 0..3 do
result[i] = if a[i] then 33 else 0 fi
endfor
return result