# Flow Control

## Overview

**Flow Control Nodes** are used to define the order in which the **Logic** is evaluated, allow a program to consider multiple conditions, and perform different actions based on those variable conditions.

**Nodes** in the **Flow Control** category fall into two subcategories:

* [***Relational Expression*** **Nodes**](https://docs.incari.com/incari-studio/toolbox/flow-control#relational-expression-nodes)
* [***Pulse Flow*** **Nodes**](https://docs.incari.com/incari-studio/toolbox/flow-control#pulse-flow-nodes)

## Relational Expression Nodes

***Relational Expression*** **Nodes** compare two values and yield a value based on the relationship between those inputs. These include the following:

* [**IsEqual**](/incari-studio/2023.1/toolbox/flow-control/is-equal.md) - Compares whether two values are *equal*, or *not equal*, depending on `Mode`. This is the equivalent of the `==` and `!=` operators in computer programming.
* [**IsGreaterEqual**](/incari-studio/2023.1/toolbox/flow-control/is-greater-equal.md) - Compares whether one value is *greater* than another, or if they are equal, depending on `Mode`. This is the equivalent of the `>` and `>=` operators in computer programming.
* [**IsLessEqual**](/incari-studio/2023.1/toolbox/flow-control/is-less-equal.md) - Compares whether one value is *less* than another, or if they are equal, depending on `Mode`. This is the equivalent of the `<` and `<=` operators in computer programming.

## Pulse Flow Nodes

***Pulse Flow*** **Nodes** are mainly used to change the *control flow* of **Logic**, which means executing different **Logic Branches** based on various *conditions*. To achieve truly dynamic programs, they are used in synergy with ***Relational Expression*** and ***Logical Operator*** **Nodes**.

* [**Branch**](/incari-studio/2023.1/toolbox/flow-control/branch.md) - Takes one of two paths based on its input **Boolean** value. Similar to an `if` statement in computer programming.
* [**Switch**](/incari-studio/2023.1/toolbox/flow-control/switch.md) - Takes one of several paths if the input value is equal to a path's corresponding, pre-defined value. If not, then the `Default` path is taken. Similar to a `switch` statement in computer programming.
* [**Toggle**](/incari-studio/2023.1/toolbox/flow-control/toggle.md) - Holds a **Boolean** *state*, which alternates between its opposite state every time the input **Pulse** is triggered.
* [**Select Data**](/incari-studio/2023.1/toolbox/flow-control/select-data.md) - Takes two or more pairs of **Pulse** and **Data** inputs and outputs the value corresponding to the input **Pulse** that the **Node** was executed by. This is a useful way to converge **Pulse Flow** into a single path.

Additionally, **Incari** has the [**Sequential Node**](/incari-studio/2023.1/toolbox/flow-control/sequential.md), which triggers all output **Pulses** sequentially and is used primarily as a means of grouping and organizing blocks of **Logic** with a similar or combined purpose into a more visually readable way.

## See Also

* [**Boolean**](/incari-studio/2023.1/toolbox/math/boolean.md)

## External Links

* [*Control Flow*](https://www.computerhope.com/jargon/c/contflow.htm) on Computer Hope.
* [*Conditional Statement*](https://www.computerhope.com/jargon/c/contstat.htm) on Computer Hope.
* [*Logical Operation*](https://www.computerhope.com/jargon/l/logioper.htm) on Computer Hope.
* [*State*](https://www.techopedia.com/definition/696/state-computer-science) on Technopedia.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.incari.com/incari-studio/2023.1/toolbox/flow-control.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
