Within an imperative programming language, a control flow statement is a statement whose execution results in a choice being made as to which of two or more paths should be followed.
Within an imperative programming language, a control flow statement is a statement whose execution results in a choice being made as to which of two or more paths should be followed.
The kinds of control flow statements supported by different languages vary, but can be categorized by their effect:
- continuation at a different statement (unconditional branch or jump),
- executing a set of statements only if some condition is met (choice - i.e., conditional branch),
- executing a set of statements zero or more times, until some condition is met (i.e., loop the same as conditional branch),
- executing a set of distant statements, after which the flow of control usually returns (subroutines, coroutines, and continuations),
- stopping the program, preventing any further execution (unconditional halt).
from Wikipedia