Control Flow
Conditional statement
fn foo(field a) -> (field) {
// Similar to rust, the result of a conditional expression
// can be received directly by the variable
field b = if (a + 1 == 2) { 1 } else { 3 };
return b;
}fn foo(field a) -> (field) {
field b = a + 1 == 2 ? 1 : 3;
return b;
}Loop statement
While statement
Do While statement
Last updated