title: Unclassifiable statement at (1) and Unexpected data declaration statement at (1) in Fortran77?
body: <p>I am trying to count the number of lines in a file in Fortran 77
  (My file has two columns, both with numbers)</p>
  
  <p>I am getting an unclassifiable statement and unexpected data declaration and I am not sure why. This is my code: (new to fortran 77):</p>
  
  <pre><code>    PROGRAM Exercise
  
  C
  C John Smith
  C
  
  C
  C PARAMETERS
  C
        REAL PRECISION UNUM
        PARAMETER (UNUM=15)
  C
  C LOCAL VARIABLES
  C
  
  C
  C FUNCTION DECLARATIONS
  C
  
        INTEGER*8 PRECISION NUMLIN
  
  C
  C COMMON VARIABLES
  C
  
  C
  C DATA STATEMENTS
  C
        DATA FILEN /'linecounttester.txt'/
  C
  C MAIN PROGRAM MODULE
  C
  
        OPEN(UNIT=UNUM, FILE = FILEN, STATUS='OLD')
  
  C
  C function counts the lines in the file
  
  C
  
        FUNCTION NUMLIN
        INTEGER*8 PRECISION NUMLIN
        CHARACTER*256 LINE
        100 READ(UNUM,*,END=200) LINE
        NUMLIN=NUMLIN+1
        GOTO 100
        200 CONTINUE
  
        RETURN
        END
  
        REWIND(UNUM)
  
        CLOSE(UNUM)
  </code></pre>
  
  <p>This is my data file: (just a tester so I can count the lines to 8): 
  1   100
  2   200
  3   300
  4   400
  5   500
  6   600
  7   700
  8   800</p>
  
  <p>These are my errors:</p>
  
  <p>Exercise.for:58.6:</p>
  
  <pre><code>  FUNCTION NUMLIN                                                   
    1
  </code></pre>
  
  <p>Error: Unclassifiable statement at (1)
  Exercise.for:59.32:</p>
  
  <pre><code>  INTEGER*8 PRECISION NUMLIN                                        
                              1
  </code></pre>
  
  <p>Error: Symbol 'precisionnumlin' at (1) already has basic type of INTEGER
  Exercise.for:60.72:</p>
  
  <pre><code>  CHARACTER*256 LINE                                                
                                                                      1
  </code></pre>
  
  <p>Error: Unexpected data declaration statement at (1)
  Exercise.for:61.7:</p>
  
  <pre><code>  100 READ(UNUM,*,END=200)                                          
     1
  </code></pre>
  
  <p>Error: Invalid character in name at (1)
  Exercise.for:62.6:</p>
  
  <pre><code>  LINE                                                              
    1
  </code></pre>
  
  <p>Error: Unclassifiable statement at (1)
  Exercise.for:65.7:</p>
  
  <pre><code>  200 CONTINUE                                                      
     1
  </code></pre>
  
  <p>Error: Invalid character in name at (1)
  Exercise.for:41.10:</p>
  
  <pre><code>  DATA FILEN /'linecounttester.txt'/                                
        1
  </code></pre>
  
  <p>Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to REAL(4)
  Exercise.for:46.16:</p>
  
  <pre><code>  OPEN(UNIT=UNUM, FILE = FILEN, STATUS='OLD')                       
              1
  </code></pre>
  
  <p>Error: UNIT tag at (1) must be of type INTEGER
  Exercise.for:64.72:</p>
  
  <pre><code>  GOTO 100                                                          
                                                                      1
  </code></pre>
  
  <p>Error: Label 100 referenced at (1) is never defined
  Exercise.for:1.72:</p>
  
  <pre><code>  PROGRAM EXERCISE                                    
                                                                      1
  </code></pre>
  
  <p>Exercise.for:70.72:</p>
  
  <pre><code>  REWIND(UNUM)                                                      
                                                                      2
  </code></pre>
  
  <p>Error: Two main PROGRAMs at (1) and (2)</p>
  
  <p>Can anyone help me out?</p>