Difference between revisions of "Conditional (computer programming)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(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...")
(No difference)

Revision as of 03:49, 26 May 2016

[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