MathGroup Archive 1994

[Date Index] [Thread Index] [Author Index]

Search the Archive

Can you abort from the "Evaluate Notebook" process ?

  • To: mathgroup at
  • Subject: Can you abort from the "Evaluate Notebook" process ?
  • From: Simon Chandler <simonc at>
  • Date: Tue, 28 Jun 1994 13:41:47 +0100


Dear MathGroupers,

Are there any commands that will stop further evaluation of a
Notebook, where the evaluation was kicked off by the "Evaluate
Notebook" item under the "Action" menu heading ?

We have a particular Notebook that is used by several Mathematica
illiterate users. All they do is enter a single variable name, the
name of the file they want processed, and then click on the "Evaluate
Notebook" command. At the end of a (very long) calculation they are
presented with a result.

At several points in the calculation the file's contents may be such
that further calculation is silly (or impossible) so after performing
the test I would like to be able to abort the calculation and issue an
appropriate warning.

Now, if I were writing this Notebook from scratch I would correctly
'packagize' it, and write it in a way (probably using Throw and Catch)
that would allow me to easily exit from routines.  However, this
particular Notebook was written by another author and is rather
'linear' in style; if everything goes well the Notebook commands are
executed sequentially from beginning to end, et voila - the required
result.  My problem arises because I have been asked by the Notebook's
current users to provide the abort mechanism I discuss above - so that
time is not wasted continuing with a nonsensical calculation - but
without significantly changing the Notebook's contents. In particular,
they don't want me to change the Cell structure, so I can't just put
any required tests and subsequent conditionally dependent code into a
single If[] command (or can I, I may be wrong.  Please tell me if it
_is_ possible to put an If[] command across different cells).

Please tell me if you know how I can easily abort (non-manually) from
the "Evaluate Notebook" process without significantly re-writing the
Notebook. I only wish I could !


Dr Simon Chandler
Hewlett-Packard Ltd (CPB)
Filton Road
Stoke Gifford
BS12 6QZ

Tel:   0272 228109
Fax:   0272 236091
email: simonc at

  • Prev by Date: Re: Question about Cases command.
  • Next by Date: re: Question about Cases command
  • Previous by thread: Transformation of Expressions
  • Next by thread: re: Question about Cases command