Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

SETEXITQQ

QuickWin Function: Sets a QuickWin application's exit behavior. This routine is only available for Windows.

Module

USE IFQWIN

result = SETEXITQQ (exitmode)

exitmode

(Input) INTEGER(4). Determines the program exit behavior. The following exit parameters are defined in IFQWIN.F90:

  • QWIN$EXITPROMPT - Displays the following message box:

    "Program exited with exit status X. Exit Window?"

    where X is the exit status from the program.

    If Yes is entered, the application closes the window and terminates. If No is entered, the dialog box disappears and you can manipulate the windows as usual. You must then close the window manually.

  • QWIN$EXITNOPERSIST - Terminates the application without displaying a message box.

  • QWIN$EXITPERSIST - Leaves the application open without displaying a message box.

Results

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

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

Example

 ! Build as QuickWin Ap
 USE IFQWIN
 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

See Also