0

I have a notebook with many cells, one of which contains an evaluation of some condition. If it is False, I want to have an automatized way of the "Abort evaluation" button. However, I have not found such a realization.

For instance, Abort[] does not work (even for the same cell). Say, consider two cells, one

Abort[]
fff = y

and another one

ggg=z

Let us evaluate the two (the one with Abort[] first). It turns out that everything below Abort[] is still evaluated.

Is there any way to code the analog of "Abort evaluation"?

John Taylor
  • 5,701
  • 2
  • 12
  • 33
  • Could you please give an explicit example? – MarcoB Jan 09 '24 at 16:09
  • @MarcoB : I have added an example. – John Taylor Jan 09 '24 at 21:43
  • 1
    Seems similar: https://mathematica.stackexchange.com/questions/27758/how-can-the-evaluation-queue-be-aborted – Goofy Jan 09 '24 at 22:12
  • 2
    I don't know if there's a newer answer but this seems to do what you and topic linked by @Goofy ask for: https://mathematica.stackexchange.com/a/99582/5478 (you don't need $AssertFunction:=, but that is the function that needs to executed instead of Abort) – Kuba Jan 10 '24 at 10:14

0 Answers0