Invalid number: incomprehensible list input ERROR

  • Thread starter Thread starter a.marin
  • Start date Start date
  • Tags Tags
    Error Input List
Click For Summary
SUMMARY

The forum discussion addresses an "invalid number: incomprehensible list input" error encountered while running FORTRAN 77 code designed to read a text file with 6000+ rows and 56 columns. The user, A. Marin, successfully compiles the code but faces runtime issues related to input formatting. The error indicates a mismatch between the expected data format and the actual content of the 'LV_Sz1_data.txt' file. The solution involves ensuring that the input data adheres to the specified format in the read statement.

PREREQUISITES
  • Understanding of FORTRAN 77 syntax and structure
  • Familiarity with formatted input/output operations in FORTRAN
  • Knowledge of data file formats and structure
  • Experience with debugging runtime errors in programming
NEXT STEPS
  • Review FORTRAN 77 formatted input/output documentation
  • Learn about data file formatting and validation techniques
  • Explore debugging strategies for runtime errors in FORTRAN
  • Investigate the use of the 'READ' statement and its format specifiers in FORTRAN
USEFUL FOR

This discussion is beneficial for novice FORTRAN programmers, data analysts working with text files, and anyone troubleshooting input/output errors in FORTRAN applications.

a.marin
Messages
1
Reaction score
0
"invalid number: incomprehensible list input" ERROR

Hello, I'm beginning to code in FORTRAN 77 so be patient please.

I'm trying to read a plain text file (*.txt) which has 6000+ rows and 56 columns, this is the code I've been written so far:

Code:
      program segmente
      implicit real*8 (a-h,o-y)

      parameter (Ndat=300000, nca=56)
      parameter (length=2000, kshift=1000)

      dimension daten(Ndat,nca)

      character*1 b1,b2,b3,s1,s2,s3

      open(unit=1,file='LV_Sz1_data.txt',status='old')

      do nt=1,ndat
        read(1,*) dummy,(daten(nt,nc),nc=1,nca)
      enddo

      kens=(Ndat-length)/kshift+1

      do k=1,kens
        write(*,*) 'Segment ',k

	a1=int(k/100)
	a2=int((k-a1*(100))/10)
	a3=int(k-a1*(100)-a2*(10))
	a7=a1+48
	a8=a2+48
	a9=a3+48
	b1=char(int(a7))
        b2=char(int(a8))
        b3=char(int(a9))

        ki=(k-1)*(length-kshift)+1
        kf=ki+length-1

        open(51,file=
     &'INTRA_SEG/IC56/Seg'//b1//b2//b3,status='unknown')
        do kt=ki,kf
          write(51,'(99E16.6)') (daten(kt,nc),nc=1,nca)
        enddo
        close(51)
      enddo

C
      END

When I compile this code nothing wrong happens, but when I try to run it appears the following errors:

invalid number: incomprehensible list input
apparent state: unit 1 named LV_Sz1_data.txt
last format: list io
lately reading direct formatted external IO
Aborted

So, What I'm doing wrong here?

Thanks in advance.

A. Marin.
 
Technology news on Phys.org


That probably means that the format of the input is not what you have told the computer to expect.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
12K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K