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

**URL:** <https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104>\
**Category:** Help\
**Created:** [January 3, 2024, 10:58am UTC](https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104 "2024-01-03T10:58:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![soumaya](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@soumaya](https://fortran-lang.discourse.group/u/soumaya)\
**Post date:** [January 3, 2024, 10:58am UTC](https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104/1 "2024-01-03T10:58:06Z")

</div>

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)=XNCU_1.D-22  
DENS(KT,2)=XNCUP_1.D-22  
DENS(KT,3)=XNCUPP_1.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)

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [January 3, 2024, 11:07am UTC](https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104/2 "2024-01-03T11:07:53Z")

</div>

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:

> [@soumaya](#):
>
> READ(153,_)_

There is no proper format or the like.

---

<div class="post-metadata">

**Author:** ![soumaya](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@soumaya](https://fortran-lang.discourse.group/u/soumaya)\
**Post date:** [January 3, 2024, 11:48am UTC](https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104/3 "2024-01-03T11:48:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [January 3, 2024, 12:11pm UTC](https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104/4 "2024-01-03T12:11:39Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![soumaya](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@soumaya](https://fortran-lang.discourse.group/u/soumaya)\
**Post date:** [January 3, 2024, 1:53pm UTC](https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104/5 "2024-01-03T13:53:50Z")

</div>

Lahey Fortran 95

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [January 3, 2024, 2:22pm UTC](https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104/6 "2024-01-03T14:22:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nbehrnd](https://avatars.discourse-cdn.com/v4/letter/n/e0b2c6/32.png) [@nbehrnd](https://fortran-lang.discourse.group/u/nbehrnd)\
**Post date:** [January 3, 2024, 7:09pm UTC](https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104/7 "2024-01-03T19:09:50Z")

</div>

> [@soumaya](#):
>
> WRITE(_,_) ‘DEBUT DE LA LECTURE DE FICHIER DENSITE’

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.

```f90
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:

 ![danger](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/c/c0661a576f5e20c73388020bf25a6eb13a3b1a92.png)

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é](https://www.mpi-inf.mpg.de/news/spotlights/2019/azerty-ameliore-french-keyboard-layout-optimized) (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](https://github.com/tonsky/FiraCode). In a good editor (above I used [geany](https://www.geany.org/)), there is [syntax highlighting](https://en.wikipedia.org/wiki/Syntax_highlighting) to help you here.

\* Almost a _poisson d’avril_ they published this on an April 2nd.

---

<div class="post-metadata">

**Author:** ![mecej4](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/mecej4/32/855_2.png) [@mecej4](https://fortran-lang.discourse.group/u/mecej4)\
**Post date:** [January 4, 2024, 5:20am UTC](https://fortran-lang.discourse.group/t/the-invalid-repeat-count-was-detected-in-list-directed-or-namelist-input-data/7104/8 "2024-01-04T05:20:13Z")

</div>

@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.
