SETEXITQQ

QuickWin Function: Sets a QuickWin application's exit behavior.

Module: USE DFLIB

Syntax

result = SETEXITQQ (exitmode)

exitmode
(Input) INTEGER(4). Determines the program exit behavior. The following exit parameters are defined in DFLIB.F90 (in the \DF98\INCLUDE subdirectory):


Results:

The result is of type INTEGER(4). The result is zero if successful; otherwise, a negative value.

The default for both QuickWin and Standard Graphics applications is QWIN$EXITPROMPT.

Compatibility

STANDARD GRAPHICS QUICKWIN GRAPHICS LIB

See Also: GETEXITQQ, Using QuickWin

Example

 ! Build as QuickWin Ap
 USE DFLIB
 INTEGER(4) exmode, result

 WRITE(*,'(1X,A,/)') 'Please enter the exit mode 1, 2   &
                      or 3 '
 READ(*,*) exmode
 SELECT CASE (exmode)
   CASE (1)
     result = SETEXITQQ(QWIN$EXITPROMPT)
   CASE (2)
     result = SETEXITQQ(QWIN$EXITNOPERSIST)
   CASE (3)
     result = SETEXITQQ(QWIN$EXITPERSIST)
   CASE DEFAULT
     WRITE(*,*) 'Invalid option - checking for bad     &
                 return'
     IF(SETEXITQQ( exmode ) .NE. -1) THEN
       WRITE(*,*) 'Error not returned'
     ELSE
       WRITE(*,*) 'Error code returned'
     ENDIF
 END SELECT
 END