NCEPLIBS-bufr  12.0.1
igetntbl.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Read the next line from a master table B, table D or Code/Flag
3 C> table file
4 C>
5 C> @author J. Ator @date 2007-01-19
6 
7 C> This subroutine reads the next line from an ASCII master table B,
8 C> table D or Code/Flag table file, ignoring any blank lines or comment
9 C> lines in the process.
10 C>
11 C> @param[in] LUNT -- integer: Fortran logical unit number for
12 C> ASCII file containing table information
13 C> @param[out] LINE -- character*(*): Next non-blank, non-comment line
14 C> that was read from LUNT
15 C> @returns igetntbl -- integer: return code
16 C> - 0 = normal return
17 C> - -1 = end-of-file encountered while reading
18 C> from LUNT
19 C> - -2 = I/O error encountered while reading
20 C> from LUNT
21 C>
22 C> @author J. Ator @date 2007-01-19
23  FUNCTION igetntbl ( LUNT, LINE )
24 
25  CHARACTER*(*) line
26 
27 C-----------------------------------------------------------------------
28 C-----------------------------------------------------------------------
29 
30  10 READ ( lunt, '(A)', END=100, ERR=200 ) line
31  IF ( ( line .EQ. ' ' ) .OR. ( line(1:1) .EQ. '#' ) ) GOTO 10
32  IF ( line(1:3) .EQ. 'END' ) GOTO 100
33 
34  igetntbl = 0
35  RETURN
36 
37  100 igetntbl = -1
38  RETURN
39 
40  200 igetntbl = -2
41  RETURN
42 
43  END
function igetntbl(LUNT, LINE)
This subroutine reads the next line from an ASCII master table B, table D or Code/Flag table file,...
Definition: igetntbl.f:24