Log in / create account | Login with OpenID
DocForge
Programmer's Wiki

Control flow statement

From DocForge

A control flow statement is a programming construct which alters the continued standard execution of a program. Some provide decision points during application execution dependent on one or more conditions.

There are various types of control flow statements:

  • Conditionals execute certain statements only if a given condition is met. (e.g. if statement)
  • Loops execute sets of statements repeatedly. (e.g. while loop, for loop)
  • Subroutines hand control to another section of code or application. (e.g. function calls)
  • Jumps defer execution to another statement. (e.g. goto)
  • Halts terminate the application. (e.g. PHP/exit)
Do you have information or insights to contribute to this article? Please feel free to edit this page. Ask questions or contribute to the discussion on this article's talk page.