Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Conditional (computer programming)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Control flow statement that executes code according to some condition(s)}} [[File:If-Then-Else-diagram.svg|thumb|If-then-else flow diagram]] [[File:IF-THEN-ELSE-END flowchart.svg|thumb|right|A nested ''if–then–else'' flow diagram]] In [[computer science]], '''conditionals''' (that is, '''conditional statements''', '''conditional expressions''' and '''conditional constructs''') are [[programming language]] constructs that perform different computations or actions or return different values depending on the value of a [[Boolean data type|Boolean]] expression, called a ''condition''. Conditionals are typically implemented by selectively executing instructions. Although [[dynamic dispatch]] is not usually classified as a conditional construct, it is another way to select between alternatives at [[run time (program lifecycle phase)|runtime]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)