J3/01-236 Date: 4 June, 2001 To: J3 From: /Interop Subject: Normal program termination (Issue 241) At program termination, except in the case of termination due to an error condition, connected units are closed (Section 9.4.6 [178:31-33]). The current text does not explicitly address the case of termination inside a procedure defined by a companion processor such as C. Connected units should be closed if the program is terminated normally by a C procedure. Rather than add interoperability text to the section on the CLOSE statement, the concept of "normal termination" is added in section 2 and referenced in sections 9.4.6 (CLOSE), 2.3.3 (END), and 8.4 (STOP). Edits are against 01-007r1 Edit: [15:3] replace "causes termination of execution" with "causes normal termination of execution" Edit: after [15:22] insert "Normal termination of execution of the program occurs if a STOP statement is executed or if an END statement is executed in the main program. Normal termination of execution of the program also may occur during execution of a procedure defined by a companion processor. (C Standard 5.1.2.2.3 and 7.20.4.3). If normal termination of execution occurs within a Fortran program unit and the program incorporates procedures defined by a companion processor, the process of execution termination shall include the effect of executing the C exit() function (C Standard 7.20.4.3)." Edit: [163:37] replace "causes termination of execution of the program." with "causes normal termination of execution of the program." Edit: [178:15] replace "at the termination of" with "at the normal termination of" Edit: [178:31] replace "At termination of execution of the program for reasons other than an error condition" with "At normal termination of execution of the program" Edit: [178:34-43] Delete Unresolved issue 241