Flow Control
While loops
The evaluation expression is required to be of type bool.
1 2 3 |
|
For loops
They can be used to iterate over ranges or lists.
1 2 3 4 5 6 |
|
If else statements
The evaluation expression is required to be of type bool.
1 2 3 4 5 6 |
|
Switch statement
No implicit fallthrough, this means that in comparison with languages like C, the equivalent to a break statement is implicit in Lesma, therefore you need to specify the fallthrough
keyword for the flow to go downstream to the other cases. Break statements are not allowed inside a switch statement.
1 2 3 4 5 6 7 8 9 10 11 12 |
|