The invalid repeat count was detected in list directed or namelist input data

WRITE(,) ‘DEBUT DE LA LECTURE DE FICHIER DENSITE’
OPEN (153,FILE=‘1DENS’)
DO I=1,8 !on saute les 8 1ère lignes ’
READ(153,)
ENDDO
DO KT=KT2,KT1,-KT3
READ(153,
) XTEMP,XNAR,XNHE,XNCU,XNE,
&XNARP,XNARPP,XNARPPP,XNCUP,XNCUPP,XNCUPPP,XNCW2,XNCUM,
&XNHEP,XNHEPP
DENS(KT,1)=XNCU1.D-22
DENS(KT,2)=XNCUP
1.D-22
DENS(KT,3)=XNCUPP1.D-22
DENS(KT,4)=XNCUPPP
1.D-22
DENS(KT,5)=XNCUM*1.D-22

DENS(KT,6)=XNAR*1.D-22
DENS(KT,7)=XNARP*1.D-22
DENS(KT,8)=XNARPP*1.D-22
DENS(KT,9)=XNARPPP*1.D-22

    DENS(KT,10)=XNHE*1.D-22
DENS(KT,11)=XNHEP*1.D-22
DENS(KT,12)=XNHEPP*1.D-22
DENS(KT,13)=XNCW2*1.D-22
    DENS(KT,14)=XNE*1.D-22
    DENS(KT,15)=xTEMP
DO K=1,15
IF(DENS(KT,K).LT.1.D-299) DENS(KT,K)=1.D-299 
ENDDO                                                                 
ENDDO

  WRITE(*,*) 'FIN DE LA LECTURE DE FICHIER DENSITE'

190 FORMAT (1h*,1x,I5,1X,1h*,1x,14(1pe10.3,1x,1h*))
CLOSE(153)

Please, write out the question you have, simply using the title is not enough. But looking at the code you posted without any furhter explanation about the type of error, I think this is the culprit:

There is no proper format or the like.

1 Like

thank you
When I compile the code, this message appears.
The program starts reading the file but it cannot read it entirely.

What compiler and what platform? It seems strange to me that the program gets built at all. Are you sure there is a new executable based on this code?

Lahey Fortran 95

That is a blast from the past! Could you try it with, say, gfortran or Intel Fortran oneAPI? Lahey Fortran is very old indeed.

Are you using a modern AZERTY French keyboard, or even bépo and typed the snippet of code ? To get the first line working, I noticed completing the instruction for write is not sufficient.

program test
  ! WRITE(,) ‘DEBUT DE LA LECTURE DE FICHIER DENSITE’
  WRITE(*,*) 'DEBUT DE LA LECTURE DE FICHIER DENSITE'
end program test

It is difficult to see, so I enclose a screen photo:

When enclosing a string, refrain from these single quotation marks which appear similar to a small 6 or 9, with a small droplet you find below 7 and 8 on the top row of AZERTY amélioré (published 2019)*. Either use straight (English) double quote sign/double prime " as used as unit of foot/feet (below 3 in the top row, elder AZERTY), or the straight ' below 4.

If you continue to use AZERTY amélioré, at least both characters safe to (pairwise) enclose a string in source coded join one key in common (top row, right to 0). Not all type families render the difference between the difference between accents, primes/double primes or feet/inch safe for source code vs English single/double quotes clearly, above I used FiraCode Mono Regular. In a good editor (above I used geany), there is syntax highlighting to help you here.

* Almost a poisson d’avril they published this on an April 2nd.

1 Like

@soumaya , post program code using the “format as code button”, icon </> in the toolbar. Without that, the code gets mangled and ambiguous, and replies based on guessing what the code was can be confusing.