Invalid number: incomprehensible list input ERROR

  • Thread starter Thread starter a.marin
  • Start date Start date
  • Tags Tags
    Error Input List
AI Thread Summary
The discussion revolves around a FORTRAN 77 coding issue where the user encounters an "invalid number: incomprehensible list input" error while attempting to read data from a text file with over 6000 rows and 56 columns. The user has provided their code, which includes opening the file and reading data into an array. The error suggests a mismatch between the expected format of the input data and the actual format present in the text file. The response indicates that the user should check the format of the input data to ensure it aligns with what the program is trying to read. This highlights the importance of ensuring data consistency and format compatibility when performing file I/O operations in FORTRAN.
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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Back
Top