C Library Functions  - fileclose (3)

NAME

fileclose(3f) - [M_io] A simple close of a sequential file (LICENSE:PD)

CONTENTS

Synopsis
Description
Option
Returns
Example
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

EXAMPLE

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) July 22, 2023
Generated by manServer 1.08 from beb63751-6426-4a7b-b846-ad5cc027dab9 using man macros.