Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Fortran Compiler for HP-UX: HP Fortran Programmer's Reference > Chapter 10 HP Fortran statements

PAUSE

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Temporarily stops program execution.

Syntax

PAUSE pause-code
pause-code

is a character constant or a list of up to 5 digits.

Description

The PAUSE statement suspends program execution and prints a message, depending on whether digits, characters, or nothing has been specified in the PAUSE statement:

  • If digits, the message “PAUSE digits” is written to standard error.

  • If a character expression, the message “PAUSE character-expression” is written to standard error.

  • If nothing appears after PAUSE, the word “PAUSE” is written to standard error.

After displaying the appropriate message, the PAUSE statement writes to standard output one of two messages that give information on resuming the program. If the standard input device is a terminal, the message is:

To resume program execution, type GO.

At this point the program is suspended and remains so until the operator types the word GO and presses the Return key. The program will terminate if anything other than GO is entered.

If the standard input device is other than a terminal, the message is:

To resume execution, execute a kill -15 pid  &
command

where pid is the unique process identification number of the suspended program. This command can be issued at any terminal at which the user is logged in.

Examples

! Write ”PAUSE 7777” to standard error
PAUSE 7777

! Write ”PAUSE MOUNT TAPE” to standard error
PAUSE 'MOUNT TAPE'

! Write ”PAUSE” to standard error
PAUSE

Related statements

STOP

Related concepts

For information about flow control statements, see “Flow control statements”.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.