Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / Programming / Flow Control /

If

FilledSmallSquare If[condition, t, f] gives t if condition evaluates to True, and f if it evaluates to False.

FilledSmallSquare If[condition, t, f, u] gives u if condition evaluates to neither True nor False.

FilledSmallSquare If evaluates only the argument determined by the value of the condition.

FilledSmallSquare If[condition, t, f] is left unevaluated if condition evaluates to neither True nor False.

FilledSmallSquare If[condition, t] gives Null if condition evaluates to False.

FilledSmallSquare See Section 1.5.6 and Section 2.6.8.

FilledSmallSquare See also: Switch, Which, Condition, DiracDelta.

FilledSmallSquare New in Version 1.

Further Examples



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.