DOCUMENTATION CENTER SEARCH
Mathematica
>
Conditionals
>
Built-in
Mathematica
Symbol
Relational and Logical Operators
Conditionals
Tutorials »
|
Switch
Which
Condition
Piecewise
Boole
DiracDelta
See Also »
|
Conditionals
Language Overview
Logic & Boolean Algebra
Procedural Programming
More About »
If
If
[
condition
,
t
,
f
]
gives
t
if
condition
evaluates to
True
, and
f
if it evaluates to
False
.
If
[
condition
,
t
,
f
,
u
]
gives
u
if
condition
evaluates to neither
True
nor
False
.
MORE INFORMATION
If
evaluates only the argument determined by the value of the condition.
If
[
condition
,
t
,
f
]
is left unevaluated if
condition
evaluates to neither
True
nor
False
.
If
[
condition
,
t
]
gives
Null
if
condition
evaluates to
False
.
EXAMPLES
CLOSE ALL
Basic Examples
(1)
In[1]:=
In[2]:=
Out[2]=
Scope
(4)
Generalizations & Extensions
(1)
Properties & Relations
(4)
SEE ALSO
Switch
Which
Condition
Piecewise
Boole
DiracDelta
TUTORIALS
Relational and Logical Operators
Conditionals
MORE ABOUT
Conditionals
Language Overview
Logic & Boolean Algebra
Procedural Programming
RELATED LINKS
NKS|Online
(
A New Kind of Science
)
New in 1
© 2008 Wolfram Research, Inc.