The TELEMAC-MASCARET system
trunk
sources
utils
bief
bief_eof.f
Go to the documentation of this file.
1
! *************************
2
LOGICAL
FUNCTION
bief_eof
3
! *************************
4
!
5
&(lunit)
6
!
7
!***********************************************************************
8
! BIEF V6P2 21/08/2010
9
!***********************************************************************
10
!
11
!brief DETECTS THE END OF A FILE:
12
!+
13
!+ IF EOF = .TRUE. : HAS REACHED END OF FILE,
14
!+
15
!+ IF EOF = .FALSE. : CAN CARRY ON.
16
!
17
!history
18
!+ 17/08/94
19
!+ V5P1
20
!+ ORIGINAL IDEA : ANTOINE YESSAYAN (THANK YOU TONIO)
21
!
22
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
23
!+ 13/07/2010
24
!+ V6P0
25
!+ Translation of French comments within the FORTRAN sources into
26
!+ English comments
27
!
28
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
29
!+ 21/08/2010
30
!+ V6P0
31
!+ Creation of DOXYGEN tags for automated documentation and
32
!+ cross-referencing of the FORTRAN sources
33
!
34
!history J-M HERVOUET (LNHE)
35
!+ 11/06/2012
36
!+ V6P2
37
!+ Name changed from eof to bief_eof (eof is a Fortran extension of
38
!+ some compilers, let us avoid conflicts...)
39
!
40
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41
!| LUNIT |-->| LOGICAL INUT OF FILE TO BE READ
42
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43
!
44
USE
declarations_special
45
IMPLICIT NONE
46
!
47
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
48
!
49
INTEGER
,
INTENT(IN)
:: LUNIT
50
!
51
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
52
!
53
bief_eof
= .false.
54
!
55
READ
(unit=lunit,err=100,end=100)
56
backspace(unit=lunit,err=101)
57
RETURN
58
!
59
100
CONTINUE
60
!
61
bief_eof
=.true.
62
RETURN
63
!
64
101
CONTINUE
65
!
66
WRITE
(
lu
,*)
'ERROR IN FUNCTION EOF (BIEF) ERROR IN BACKSPACE'
67
WRITE
(
lu
,*)
'AFTER A CORRECT READ, COMPILER ERROR ?'
68
WRITE
(
lu
,*)
'A TENTATIVE BIEF_EOF=.TRUE. IS RETURNED'
69
bief_eof
=.true.
70
!
71
!-----------------------------------------------------------------------
72
!
73
RETURN
74
END
declarations_special
Definition:
declarations_special.F:3
declarations_special::lu
integer lu
Definition:
declarations_special.F:45
bief_eof
logical function bief_eof(LUNIT)
Definition:
bief_eof.f:7