Former-commit-id:7fa9dbd5fb
[formerly4bfbdad17d
] [formerly9f8cb727a5
] [formerly7fa9dbd5fb
[formerly4bfbdad17d
] [formerly9f8cb727a5
] [formerly8485b90ff8
[formerly9f8cb727a5
[formerly bf53d06834caa780226121334ac1bcf0534c3f16]]]] Former-commit-id:8485b90ff8
Former-commit-id:40aa780b3d
[formerly33a67cdd82
] [formerly 73930fb29d0c1e91204e76e6ebfdbe757414f319 [formerlya28d70b5c5
]] Former-commit-id: a16a1b4dd44fc344ee709abbe262aeed58a8339b [formerlye5543a0e86
] Former-commit-id:0c25458510
37 lines
1.1 KiB
Fortran
37 lines
1.1 KiB
Fortran
SUBROUTINE DM_CHKF ( iflno, iret )
|
|
C************************************************************************
|
|
C* DM_CHKF *
|
|
C* *
|
|
C* This subroutine checks that the input file number is in the *
|
|
C* proper range and that a file has been opened using that number. *
|
|
C* *
|
|
C* DM_CHKF ( IFLNO, IRET ) *
|
|
C* *
|
|
C* Input parameters: *
|
|
C* IFLNO INTEGER File number to check *
|
|
C* *
|
|
C* Output parameters: *
|
|
C* IRET INTEGER Return code *
|
|
C* 0 = normal return *
|
|
C* -4 = file not open *
|
|
C** *
|
|
C* Log: *
|
|
C* M. desJardins/GSFC 6/86 *
|
|
C************************************************************************
|
|
INCLUDE 'GEMPRM.PRM'
|
|
INCLUDE 'GMBDTA.CMN'
|
|
INCLUDE 'dmcmn.cmn'
|
|
C------------------------------------------------------------------------
|
|
C* Check that file number is in proper range and then see that a
|
|
C* file has been opened using that file number, i.e. the logical
|
|
C* unit number for the file is non-negative.
|
|
C
|
|
iret = 0
|
|
IF ( ( iflno .lt. 1) .or. ( iflno .gt. MMFILE ) ) THEN
|
|
iret = -4
|
|
ELSE
|
|
IF ( lundm (iflno) .lt. 0 ) iret = -4
|
|
END IF
|
|
C*
|
|
RETURN
|
|
END
|