Intel fortran-80 manual PAUSE Statement, STOP Statement, 4.3.3EN 0 Statement

Models: fortran-80

1 130
Download 130 pages 742 b
Page 48
Image 48
4.3.1 PAUSE Statement

Program Execution Controls

FORTRAN-SO

4.3.1 PAUSE Statement

The format of the PAUSE statement is

PAUSE [msg]

where 'msg' is a string of not more than five digits, or is a character constant. At the time the PAUSE is executed and program execution ceases, 'msg' is displayed on the console terminal.

Program execution must be resumable following the pause. Resumption is not under program control, however, and might be initiated, for example, by an external inter- rupt such as a key being pressed. If execution is resumed, the normal execution se- quence is continued with the statement following the PAUSE statement.

Examples:

PAUSE

PAUSE 1234

PAUSE 'BREAK12'

4.3.2 STOP Statement

The format of the STOP statement is

STOP [msg]

where 'msg' is a string of not more than five digits, or is a character constant.

STOP terminates execution of the executable program. When this happens 'msg' is displayed on the console terminal.

Examples:

STOP

STOP 22

STOP 'CHECKSUM'

4.3.3EN 0 Statement

The format of the END statement is

END

The END statement marks the end of a program unit. If executed in a main pro- gram, it terminates the program. If executed in a subprogram, it has the effect of a RETURN statement and returns to the main program. The last line of every pro- gram unit must be an END statement.

An END statement is written only in columns 7 through 72 of an initial line and must not be continued. No other statement in a program unit can have an initial line that appears to be an END statement.

4-8

Page 48
Image 48
Intel fortran-80 manual PAUSE Statement, STOP Statement, 4.3.3EN 0 Statement