Conditional (computer programming)

From Wiki @ Karl Jones dot com
Revision as of 03:49, 26 May 2016 by Karl Jones (Talk | contribs) (Created page with "[File:If-Then-Else-diagram.svg.png[|thumb|If Then Else diagram in UML.]]In computer science, '''conditional statements''', '''conditional expressions''' and '''conditi...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

[File:If-Then-Else-diagram.svg.png[|thumb|If Then Else diagram in UML.]]In computer science, conditional statements, conditional expressions and conditional constructs are features of a programming language, which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false.

Apart from the case of branch predication, this is always achieved by selectively altering the control flow based on some condition.

Description

In imperative programming languages, the term "conditional statement" is usually used, whereas in functional programming, the terms "conditional expression" or "conditional construct" are preferred, because these terms all have distinct meanings.

Although dynamic dispatch is not usually classified as a conditional construct, it is another way to select between alternatives at runtime.

See also

External links