The PAUSE statement temporarily suspends program execution until the user or system resumes execution. The PAUSE statement is an obsolescent feature in Fortran 90, which has been deleted in Fortran 95. Compaq Fortran fully supports features deleted in Fortran 95.
The PAUSE statement takes the following form:
PAUSE [pause-code]
If you specify pause-code, the PAUSE statement displays the specified message and then displays the default prompt.
If you do not specify pause-code, the system displays the following default message:
FORTRAN PAUSE
The following prompt is then displayed:
PAUSE prompt>
Fortran Pause - Enter command<CR> or <CR> to continue.
The effect of PAUSE differs depending on whether the program is an interactive or batch process, as follows:
In general, most other commands also terminate execution.
The effect of PAUSE differs depending on whether the program is a foreground or background process, as follows:
Any other command terminates execution.
stdin
, as follows: stdin
is redirected from a file,
the system displays the following (after the pause code and
prompt):
To continue from background, execute 'kill -15 n'
In this message, n
is the process id of the
program.
stdin
is not redirected from a
file, the program becomes a suspended background job, and
you must specify fg
to bring the job into
the foreground. You can then enter a command to resume or
terminate processing. Effect on Windows NT and Windows 9* Systems
The program waits for input on stdin
. If you enter a
blank line, execution resumes at the next executable statement.
Anything else is treated as a DOS command and is executed by a
system( )
call. The program loops, letting you execute
multiple DOS commands, until a blank line is entered. Execution then
resumes at the next executable statement.
The following examples show valid PAUSE statements:
PAUSE 701 PAUSE 'ERRONEOUS RESULT DETECTED'
stdin
, see your user manual or
programmer's guide.