This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Mathematica's symbolic character allows a powerful unification of the notion of conditionals in programming and in mathematics.
Equal(== ▪ Unequal(!= ▪ SameQ(=== ▪ And(&& ▪ IntegerQ  ▪ ...
Procedural Conditionals
If test if a condition is true, false, or of unknown truth value
Which test which of a sequence of conditions are true
Switch switch based on a value, with patterns allowed
Piecewise an arbitrary piecewise function
ConditionalExpression expression defined under condition
UnitStep  ▪ Sign  ▪ Mod  ▪ Floor  ▪ Boole  ▪ DiscreteIndicator  ▪ ...
Replace replace an expression if a rule applies
Condition (/;) — specify an arbitrary condition for a pattern to match
NestWhile  ▪ TakeWhile  ▪ ...
Select  ▪ Cases  ▪ Pick  ▪ ...
Program Execution Conditionals