C Library Functions - fileclose (3)
NAME
fileclose(3f) - [M_io] A simple close of a sequential file
(LICENSE:PD)
CONTENTS
Synopsis
Description
Option
Returns
Examples
Author
License
SYNOPSIS
function fileclose(lun) result(ios)
integer,intent(in) :: lun
integer :: ios
DESCRIPTION
A convenience command for closing a file that leaves an
error message in the current journal file if active.
OPTION
LUN unit number to close
RETURNS
IOS status value from CLOSE
EXAMPLES
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
AUTHOR
John S. Urban
LICENSE
Public Domain
| Nemo Release 3.1 | fileclose (3) | June 29, 2025 |
Generated by manServer 1.08 from 6f6f6909-d734-4bf7-9d99-4a4d73ba182f using man macros.