Mathematica 9 is now available

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

Catch

FilledSmallSquare Catch[expr] returns the argument of the first Throw generated in the evaluation of expr.

FilledSmallSquare Catch[expr, form] returns value from the first Throw[value, tag] for which form matches tag.

FilledSmallSquare Catch[expr, form, f] returns f[value, tag].

FilledSmallSquare Catch[expr, ... ] always returns the value of expr if no Throw was generated during the evaluation.

FilledSmallSquare form can be any expression, and is often a pattern.

FilledSmallSquare tag in Throw[value, tag] is re-evaluated every time it is compared to form.

FilledSmallSquare See Section 2.6.9.

FilledSmallSquare See also: Check, CheckAbort, Reap.

FilledSmallSquare New in Version 1; modified in 3.

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.