> For the complete documentation index, see [llms.txt](https://docs.incari.com/incari-studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.incari.com/incari-studio/master/toolbox/flow-control/branch.md).

# Branch

## Overview

![](/files/-MIx_tb1hd7h6wfrGu4-)

Like a branch on a tree, the **Branch Node** splits a single path into two diverging paths. Which branch of logic is executed depends on a single condition, which can itself be composed of multiple conditions. At a high level it basically means "*If this is true, do this; if not, do this.*" which sounds relatively simplistic, however, branching is a foundational concept of creating interactive logic, similar to using *if statements* in programming, and when combined with **Relational Expression**, **Pulse Flow** and **Logical Operator** **Nodes**, we can build incredibly complex systems.

## Uses

There are infinite uses for the **Branch Node**, however a very basic example would be a single **Input** condition, which triggers one of two functions. In the example below we use a **Variable** to represent whether the unit of measurement for distance is set to *km/h* or *mph*, and trigger functions to display data in the corresponding format.

![Basic example of the Branch node.](/files/-MIx_tb2d6rh-u-pyzXw)

These *conditional statements* can be chained together and combined with other **Nodes**. Below is an example where the **Logic** checks:

1. If the passenger seat is occupied. If it is (*true*) then...
2. It checks if the passenger seat belt is fastened. If it isn't (*false*) then...
3. It sounds an alarm.

![An intermediate example of the Branch node.](/files/-MIx_tb39gDMIN_o0hX-)

## Inputs

| Input             | Type      | Description                                                           |
| ----------------- | --------- | --------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse** | A standard **Input Pulse**, to trigger the execution of the **Node**. |

## Outputs

| Output    | Type      | Description                                                                   |
| --------- | --------- | ----------------------------------------------------------------------------- |
| `OnTrue`  | **Pulse** | Triggers the execution of subsequent logic if **Input** condition is *True*.  |
| `OnFalse` | **Pulse** | Triggers the execution of subsequent logic if **Input** condition is *False*. |

## External Links

* [*Condiitonal (computer programming*](https://en.wikipedia.org/wiki/Conditional_\(computer_programming\)) on Wikipedia.
