Control Flow

Conditionals (If/Else)

Use if, elseif, and else to create decision branches. You can label the branches using then (label) or is (label).

Flow Chart Example
Loading...
flow decisions

Another example showing logic flow with explicit stop points:

Flow Chart Example
Loading...
flow decisions 1

You can verify values using equals or is syntax:

Flow Chart Example
Loading...
flow decisions 2

Switch / Case

The switch keyword allows for multi-branch decisions based on a value.

Flow Chart Example
Loading...
flow switch

Loops (Repeat)

You can represent iterative processes using repeat loops. The loop continues until the condition in repeat while is met.

Flow Chart Example
Loading...
flow loops

While Loops

Alternatively, use while loops where the condition is checked at the start.

Flow Chart Example
Loading...
flow while

Backward Actions in Loops

In a repeat loop, you can specify an action to be performed when looping back using the backward keyword.

Flow Chart Example
Loading...
flow backward

Parallel Processing (Fork)

You can split the processing into parallel paths using fork, fork again, and end fork.

Flow Chart Example
Loading...
flow fork

Use end merge instead of end fork to show a diamond merge shape.