[UP]


Manual Reference Pages  - 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.ne.0)then
          write(*,*)’<ERROR> opening file’
       endif
       ios=fileclose(lun)
    end program demo_fileclose

AUTHOR

John S. Urban

LICENSE

Public Domain


fileclose (3) March 11, 2021
Generated by manServer 1.08 from 88079af3-5617-4c53-9950-02a69de3b3d9 using man macros.