To: J3 J3/15-192 From: Steve Lionel and Dan Nagle Subject: Control of message and exception warning for STOP/ERROR STOP Keywords: STOP, ERROR STOP Date: 2015 August 04 Reference: 15-007r1 Introduction ------------ This item arose from discussion of UK-23. The standard currently says that for the STOP and ERROR STOP statements that the stop code "is made available in a processor-dependent manner." A common implementation of this is to display a message on the standard error output unit such as "FORTRAN STOP 1234". Many users have requested the ability to suppress display of this message, especially as the standard also encourages implementations to return integer stop codes as the program's exit status. Users have also requested the ability to suppress the standard's required "warning" indicating which exceptions are currently signaling. Some implementations provide a mechanism, such as environment variables, to suppress display of these messages; standard syntax for this option is desireable. Specification ------------- Add syntax to the STOP and ERROR STOP statements that allow programmer individual, execution-time control of the display of the stop code message and the exception warning. [During initial discussion it was suggested that supplying a blank string as a stop code could be an indication to suppress the message, but this would not allow for setting the program exit status with an integer stop code.] Syntax ------ The following syntax is proposed: STOP [(stop-opt-list)] stop-code ERROR STOP [(stop-opt-list)] stop-code stop-opt is STOPMSG = scalar-logical-expression or SUMMARY = scalar-logical-expression No stop-opt shall appear more than once in a stop-opt-list If any stop-opt is omitted, the default value is .TRUE.. If STOPMSG is .TRUE., the stop code is made available in a processor- dependent manner (formatted output to ERROR_UNIT recommended); if .FALSE. it is not. The recommendation that an integer stop code be supplied as the process exit status is not affected by the value of STOPMSG. If SUMMARY is .TRUE., a summary of currently signaling exceptions is output to the unit identified by ERROR_UNIT; if .FALSE. the summary is not output. Edits ----- TBS