Re: How to halt a running program without losing data?
- From: "robin" <robin_v@xxxxxxxxxxx>
- Date: Tue, 27 Dec 2005 00:33:12 GMT
<meek@xxxxxxxxxxxxxxx> wrote in message news:12JUL05.07143024@xxxxxxxxxxxxxxxxxx
> In a previous article, beliavsky@xxxxxxx wrote:
> >Random Programmer wrote:
> >
> >> Is there a Fortran command to get the program to pause if say Ctrl-C is
> >> hit and ask the user for a halt confirmation? I thought the best way
> >> might be to somehow change a variable that is stored in memory (e.g.
> >> iteration count), effectively "tricking" the program into thinking it
> >> has reached the end of it's calculations.
PL/I provides the ability to do this.
You can interrupt a program at any time, and can then do anything you
want, including printing the values of variables (useful if you want
to inspect the salient value of some iterative process to see whether
it is converging, etc), or reading in the values of any variables, etc.
You write what you want to do in an ON-unit (effectively
a procedure) that is entered when you interrupt from the keyboard.
.
- Follow-Ups:
- Re: How to halt a running program without losing data?
- From: Johan
- Re: How to halt a running program without losing data?
- From: John Doe
- Re: How to halt a running program without losing data?
- Prev by Date: Re: ARRAY wy it works?????
- Next by Date: Re: Is there interest in an embedded database engine for F95?
- Previous by thread: segmentation fault
- Next by thread: Re: How to halt a running program without losing data?
- Index(es):