Back

Control Flow

Idealogic’s Glossary

Control flow in a program relates to how different statements of a computer program are accomplished one after the other. This virtually enables the control of the order in which the programs run in case of a sequence between different segments of code. It is an important concept, to decide the paths of data flow and decide how the program should work in the given circumstances step by step.

Some forms of control flow include branching, which is a process that involves the running of blocks of code depending on the results of a condition that a coder inserts; looping which is a type of process that involves running a block of code in sequence, in a cycle, until a particular condition that the coder sets is met; and conditional execution, which is the running of certain actions pre-programmed by the coder depending on the results of a condition inserted in Control structures include the conditional statements known as if statements, switch statements and the iterative structures in the form of for loops, while loops and do while loops and calls to functions. It helps the programmer in writing of algorithms in programs in addition to other structures of logic.