Sun Studio 12: Fortran User's Guide

3.4.97 –stop_status[={yes|no}]

Permit STOP statement to return an integer status value.

The default is -stop_status=no.

With -stop_status=yes, a STOP statement may contain an integer constant. That value will be passed to the environment as the program terminates:

STOP 123

The value must be in the range 0 to 255. Larger values are truncated and a run–time message issued. Note that

STOPstop string

is still accepted and returns a status value of 0 to the environment, although a compiler warning message will be issued.

The environment status variable is $status for the C shell csh, and $? for the Bourne and Korn shells, sh and ksh.