fileclose(3f) - [M_io] A simple close of a sequential file (LICENSE:PD)
Synopsis
Description
Option
Returns
Examples
Author
License
function fileclose(lun) result(ios)
integer,intent(in) :: lun integer :: ios
A convenience command for closing a file that leaves an error message in the current journal file if active.
LUN unit number to close
IOS status value from CLOSE
Sample program:
program demo_fileclose use M_io, only : fileclose, fileopen implicit none integer :: lun integer :: ios, ierr lun=fileopen(<input.txt,ios=ierr) if(ierr /= 0)then write(*,*)<ERROR> opening file endif ios=fileclose(lun) end program demo_fileclose
John S. Urban
Public Domain
Nemo Release 3.1 | fileclose (3) | February 23, 2025 |