1 SUB Close_For_Update(INTEGER Lun) ! ! This subroutine is used to close the data file opened for update ! For use with Fortran, it is important to realize that an ONCE ! the file, is opened by this BASIC subroutine, all file I/O must ! be done via the BASIC interface. ! ! CALL Close_for_Update(LUN, Istatus) ! where ! LUN I*2 = Basic I/O Lun to use for file I/O ! ( not same as Fortran Lun) ! Istatus I*2 = Open Status ! 1 = Success ! >1 Basic error code ! ! Written by: James G. Downward ! KMS Fusion, Inc. ! P.O. Box 1567 ! Ann Arbor, Mich. 48106 ! 10-Jan-1982 ! 10 %IDENT "1" ONERROR GOTO 1000 ! Catch CLOSE errors CLOSE #LUN ! Istatus=1 ! Show Success SUBEXIT ! Return 1000 Istatus=ERR ! Show open error PRINT "VPW_Close_for_Update -- Error closing file: ";Cfile PRINT " Error number = ";ERR! PRINT " Error message= ";ERT$(ERR) SLEEP 4 ! Wait a while RESUME 2000 ! Continue 2000 SUBEXIT ! 9999 SUBEND