MathGroup Archive 2007

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

Search the Archive

Re: Interrupt Service Routines in Mathematica v.5.2?

Januk wrote:
> Hi all,
> Is it possible to create an interrupt service routine in Mathematica v.
> 5.2?  While running a long calculation, I want to define some other
> code that can be triggered by some event external to the calculation.
> On completion of the interrupt service routine, the main calculation
> should automatically resume with little or no knowledge that the
> interrupt ever occurred.
> The first place I would like to use this would be to monitor a long,
> complicated calculation in a loop.  Each iteration through the loop
> may be too slow (or too fast) for me to simply display diagnostic
> information once per iteration.  I would rather display the
> information every x-seconds, or when the user presses a button.
> Any suggestions or comments would be appreciated.
> Thanks,
> Januk

The easiest way to do this is to use my Super Widget Package (available 
free from my site). After installing this, try:

{"Press for information",SuperWidgetButton[Null,"OK",ff]}//SuperGUIRun;


Each time you press the button, you will see the current value of k. Of 
course, you will have to kill the infinite loop in this trivial example 
by hand.

David Bailey

  • Prev by Date: Re: GenerateConditions->False gives fine result!
  • Next by Date: Re: Regression
  • Previous by thread: Re: Interrupt Service Routines in Mathematica v.5.2?
  • Next by thread: Re: Interrupt Service Routines in Mathematica v.5.2?