Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Conditionals >

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.
  • 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.
New in 1
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team