generates an interrupt.
Interrupt
generates an interrupt.
Details
- You can call Interrupt anywhere within a computation. It has the same effect as an interactive interrupt at that point.
Examples
Basic Examples (2)
Interrupt a computation, bringing up a dialog box. The result here is from choosing to abort:
Print[a]; Interrupt[]; Print[b]A computation where a dialog box is brought up for every second of time taken:
s = SessionTime[];
Do[Print[Pause[i / 10]; i];If[SessionTime[] - s > 1, Interrupt[];Print["Continued"];s = SessionTime[]],
{i, 1000000}]Tech Notes
Related Guides
History
Introduced in 1991 (2.0)
Text
Wolfram Research (1991), Interrupt, Wolfram Language function, https://reference.wolfram.com/language/ref/Interrupt.html.
CMS
Wolfram Language. 1991. "Interrupt." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Interrupt.html.
APA
Wolfram Language. (1991). Interrupt. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Interrupt.html
BibTeX
@misc{reference.wolfram_2026_interrupt, author="Wolfram Research", title="{Interrupt}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/Interrupt.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_interrupt, organization={Wolfram Research}, title={Interrupt}, year={1991}, url={https://reference.wolfram.com/language/ref/Interrupt.html}, note=[Accessed: 13-June-2026]}