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