Back to category: Technology

Limited version - please login or register to view the entire paper.

Control Structures

Control flow or ordering in program execution is fundamental to most models of computing. It determines what should be done first, what second, and so forth, to accomplish some desired task. The mechanisms used to specify ordering can be organised into seven principal categories:

Sequencing: program statements are executed in the order they appear
Selection or alternation: depends on a run-time condition, a choice is to be made among two or more statements or expressions
Iteration: a given code fragment is to be executed repeatedly, either a certain number of times, or until a certain run-time condition is...

Posted by: Jason Pinsky

Limited version - please login or register to view the entire paper.