Run-Time Subroutine: Sets the prompt mode for critical errors that by default generate system prompts.
Module: USE DFLIB
Syntax
Certain I/O errors cause the system to display an error prompt. For example, attempting to write to a disk drive with the drive door open generates an "Abort, Retry, Ignore" message. When the system starts up, system error prompting is enabled by default (pmode = .TRUE.). You can also enable system error prompts by calling SETERRORMODEQQ with pmode set to ERR$HARDPROMPT (defined in DFLIB.F90 in the \DF98\INCLUDE subdirectory).
If prompt mode is turned off, a critical error that by default causes a system prompt will not cause a system prompt. Erroneous I/O statements such as OPEN, READ, and WRITE fail immediately instead of being interrupted with prompts. This allows you to intercept failures in the I/O statement (by setting ERR=errlabel, for example, where errlabel designates an executable statement) and to take a different action than that requested by the system prompt, such as opening a temporary file, giving a more informative error message, or exiting. You can turn off prompt mode by setting pmode to .FALSE. or to the constant ERR$HARDFAIL (defined in DFLIB.F90 in the \DF98\INCLUDE subdirectory).
Note that SETERRORMODEQQ affects only errors that generate a system prompt. It does not affect other I/O errors, such as writing to a nonexistent file or attempting to open a nonexistent file with STATUS='OLD'.
Compatibility
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB
Example
!PROGRAM 1
! DRIVE B door open
OPEN (10, FILE = 'B:\NOFILE.DAT', ERR = 100)
! Generates a system prompt error here and waits for the user
! to respond to the prompt before continuing
100 WRITE(*,*) ' Continuing'
END
! PROGRAM 2
! DRIVE B door open
USE DFLIB
CALL SETERRORMODEQQ(.FALSE.)
OPEN (10, FILE = 'B:\NOFILE.DAT', ERR = 100)
! Causes the statement at label 100 to execute
! without system prompt
100 WRITE(*,*) ' Drive B: not available, opening &
&alternative drive.'
OPEN (10, FILE = 'C:\NOFILE.DAT')
END