Basic Syntax

Conditional Branching

English

Overview

Switching which code runs based on a condition.

Details

A control structure, such as an if or switch statement, that switches the flow of execution based on a runtime value. At the CPU level, it's known that a mispredicted branch causes a pipeline flush, which can affect performance.

More Programming terms