Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2746

ERROR - Syntax error, found....

$
0
0

I have this error and my code is just below, can someone help me?

read_co2atm.f90(1): error #5082: Syntax error, found '(' when expecting one of: <END-OF-STATEMENT> ;
       program read_co2atm(futr_scen, nco2rec, yrco2rec, atmco2rec)
--------------------------^
read_co2atm.f90(21): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: <REAL_KIND_CON> <REAL_CONSTANT> <DBLPRC_CONSTANT> <DBLPRC_KIND_CON> <QUAPRC_CONSTANT> ...
       OPEN(luco2+1, FILE='splmlo_co2_noces.dat', FORM='formatted',
--------------------------------------------------------------------^
read_co2atm.f90(22): error #5082: Syntax error, found '&' when expecting one of: <LABEL> <END-OF-STATEMENT> ; TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE ...
      &     STATUS='old')
------------^
read_co2atm.f90(22): error #5276: Unbalanced parentheses
      &     STATUS='old')
------------------------^
read_co2atm.f90(22): error #5082: Syntax error, found ')' when expecting one of: <END-OF-STATEMENT> ;
      &     STATUS='old')
------------------------^
read_co2atm.f90(33): error #5082: Syntax error, found '&' when expecting one of: <LABEL> <END-OF-STATEMENT> ; TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE ...
      &      yrco2rec(irec),atmco2rec(irec)
-------------^
read_co2atm.f90(39): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: <REAL_KIND_CON> <REAL_CONSTANT> <DBLPRC_CONSTANT> <DBLPRC_KIND_CON> <QUAPRC_CONSTANT> ...
       WRITE(*,*) 'Atm. CO2:  No. of entries for 1-box atmosphere =',
---------------------------------------------------------------------^
read_co2atm.f90(40): error #5082: Syntax error, found '&' when expecting one of: <LABEL> <END-OF-STATEMENT> ; TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE ...
     &            nco2rec
------------------^
compilation aborted for read_co2atm.f90 (code 1)

 

 

My code

       program read_co2atm(futr_scen, nco2rec, yrco2rec, atmco2rec)

       IMPLICIT NONE

       INTEGER maxrec, nmxr
       PARAMETER (maxrec=1200, nmxr=700)

       REAL yrco2rec(maxrec), atmco2rec(maxrec)
       INTEGER luco2, irec
       INTEGER nco2rec
       INTEGER is, ireadf
       INTEGER nsipl, nstab

       REAL futco2(nmxr,8)
       REAL dummy

       CHARACTER*4 futr_scen

       luco2=50
       OPEN(luco2+1, FILE='splmlo_co2_noces.dat', FORM='formatted',
      &     STATUS='old')

       WRITE(*,*)'  '
       WRITE(*,*)'--------------------------------------------------'
       WRITE(*,*)'Atm. CO2 from fit to Siple-Mauna Loa record'
       WRITE(*,*)'--------------------------------------------------'

       DO irec=1,maxrec

        READ(luco2+1,*,ERR=222,END=222)
      &      yrco2rec(irec),atmco2rec(irec)
        nco2rec = irec
       END DO

 222   CONTINUE

       WRITE(*,*) 'Atm. CO2:  No. of entries for 1-box atmosphere =',
     &            nco2rec

       CLOSE(luco2+1)

       RETURN
       END

 

 

 

 

 


Viewing all articles
Browse latest Browse all 2746

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>