1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_cli/examples/complex_call_in_constant.zok
2022-04-06 20:23:58 +02:00

16 lines
275 B
Text

def constant() -> u32 {
u32 res = 0;
u32 x = 3;
for u32 y in 0..x {
res = res + 1;
}
return res;
}
const u32 CONSTANT = 1 + constant();
const u32 OTHER_CONSTANT = 42;
def main(field[CONSTANT] a) -> u32 {
return CONSTANT + OTHER_CONSTANT;
}