AbortProtect

AbortProtect[expr]
evaluates expr, saving any aborts until the evaluation is complete.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Protect part of a computation from early termination:

In[1]:=
Click for copyable input
Out[1]=

Make sure that an iteration is finished in a time-constrained computation:

In[1]:=
Click for copyable input
Out[1]=

Without AbortProtect, typically imax is updated, but not x:

In[2]:=
Click for copyable input
Out[2]=
New in 2
New to Mathematica? Find your learning path »
Have a question? Ask support »