FLX language provide the following control flow functions:
- do
- for
- forEach
- if
- if-else
- repeat
- return
- when-argument
- when
- while
Do
Function do executes zero or more forms added into it in the defined sequential order. The value from last evaluated from is returned as an expression value for invoking the do function.

- Add Form Button. Click to add a new form.
- A do function invocation with four forms to be executed.
For
Function for executes the for the indices defined by start index, end index, and step arguments. Both the start and the end indices are inclusive. The index variable is assigned to the current index value before executing the loop form. The last evaluated value of the loop form is returned as an expression value for invoking the for function.

- The index variable. (The name can be changed)
- The start index (inclusive).
- The end index (inclusive).
- The step amount. Default is 1.
- The loop form.
ForEach
Function forEach assigns one item from the given sequence (e.g. Array or List) at the time, in sequence order to loop variable. After assignment, the given loop form is executed. The loop item variable can be used in the loop form code. The last evaluated value of the loop form is returned as an expression value for invoking the for function.

- The loop variable. Variable is renameable.
- A sequence, e.g. an Array, a List, a Set, or a String.
- The loop form.
- An example of for-each function invocation where the sequence is an Array.
If
Function if evaluates the given condition. If it evaluates to true, then the true branch form is evaluated and returned as expression value from invoking the if function. Otherwise the Null is returned.

- The condition form.
- The true branch form.
If-Else
Function if-else evaluates the given condition. If it evaluates to true, then the true branch form is evaluated and returned as expression value from invoking the if-else function. Otherwise the false branch is evaluated and the result is returned.

- The condition form.
- The true branch form.
- The false branch form.
Repeat
Function repeat simply executes the given form N times.

- A number defining the how many times the form is executed.
- The form to be executed.
Return
Function return returns from the execution of code. If the return function with value is used, the value is returned.

- Function return without value.
- Function return with a value.
- In this example the value assigned to variable item is returned when item evaluates to be greater than 9.
When-Argument
Function when
with an argument defines a conditional expression with multiple branches. It is similar to the switch
statement in C-like languages. The case form of each branch is evaluated, and if the resulting value matches to the argument value, the branch form is evaluated and the value is returned as an expression value for the when function invocation. If none of the case values matches to the given argument, the form of else branch is evaluated and returned as expression value.

- The argument form
- The case form of a branch.
- The form of a branch.
- Remove Branch Button. Click the button to remove the branch.
- Else branch form.
- Add Branch Button. Click the button to add a new branch.
When
Function when defines a conditional expression with one or more conditional branches. Conditions in conditional branches are executed in defined order until first one of them evaluates to true. The branch form of such conditional branch is evaluated and the result is returned as expression value of the when function. If none of the conditions evaluates to true, the Null object is returned as expression value. However, the convention is that the last branch has value true as branch condition for representing else branch.

- Branch condition
- Branch form
- Remove Conditional Branch Button. Click this to remove a conditional branch.
- Add Conditional Branch Button. Click this button to add a new branch.
While
Function while implements a loop expression which executes its body form continuously while its condition is satisfied. The last evaluated value of the body form is returned as the expression value of while function.

- Condition form.
- Body form