Screamer Project  V3.3.1
Screamer Structure
 All Files Functions Variables
getnxtln.f
Go to the documentation of this file.
1  subroutine get_next_line
2  & (currline, field, nlines, eofflg, max_fields)
3 c
4 c **********************************************************************
5 c This subroutine reads in a line from a SCREAMER data file
6 c 2008-12-11 RBS: read format for currline was 80 not 120
7 c 2014-05-01 RBS: Changed integer*4 to integer
8 c 2014-05-01 RBS: field vector now passes length and size
9 c 2014-05-01 RBS: currline length now passed
10 c **********************************************************************
11 c
12 c Max_fields defined here sets the maximum distinguishable fields
13 c per line of input text.
14 c
15  character*(*) currline
16  character*(*) field(*)
17  integer nlines, eofflg, max_fields
18 c
19 c Get the next line in the file.
20 c Convert to uppercase, change tabs to blanks.
21 c If the first character is a "!", then it is a comment line.
22 c If it is not a comment line or a blank line, then
23 c separate it into fields and return, else get another line.
24 c
25  integer error, noerr
26  parameter(error = 1, noerr=0)
27  parameter(notext = 0)
28  parameter(lunit = 4)
29 c
30 c 100 format (a80)
31 c
32  200 continue
33  read (lunit, '(A120)', end=1000) currline
34 c write(6,*)'currline = ',currline
35 c write(6,*)
36  call conv_to_ucase(currline)
37  call tab2blnk(currline)
38  nlines = nlines + 1
39  call strip_blanks_commas(currline, istart, iend)
40  if (istart .ne. notext) then
41  if (currline(istart:istart) .ne. '!') then
42  call get_field(currline(istart:iend), field, max_fields)
43  eofflg = noerr
44  return
45  end if
46  end if
47  go to 200
48 c
49  1000 continue
50  eofflg = error
51  return
52 c
53  end
subroutine get_next_line(currline, field, nlines, eofflg, max_fields)
Definition: getnxtln.f:1
subroutine conv_to_ucase(text)
Definition: cnv2ucas.f:1
subroutine strip_blanks_commas(text, start, end)
Definition: strpbkcm.f:1
subroutine get_field(text, field, max_fields)
Definition: getfield.f:1
subroutine tab2blnk(text)
Definition: tab2blnk.f:1