Invalid number: incomprehensible list input ERROR

In summary: Make sure the input is in the correct format and that your code is set up to read it correctly.In summary, Make sure your input file is in the correct format and adjust your code accordingly to read it correctly.
  • #1
a.marin
1
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
  • #2


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


Hello A. Marin,

Thank you for sharing your code and the errors you are encountering. Based on the code and the errors, it seems like there may be an issue with the way the data is being read from the text file. The error "invalid number: incomprehensible list input" suggests that the code is encountering a value in the text file that it cannot interpret or convert into a number. This could be due to a formatting issue in the text file, such as a missing or extra space, or a non-numeric character. I would suggest double checking the formatting of your text file and making sure it matches the format specified in your code. It may also be helpful to use a debugging tool or print statements to identify the specific line or value that is causing the error. I hope this helps, and good luck with your coding!
 

1. What does "Invalid number: incomprehensible list input ERROR" mean?

"Invalid number: incomprehensible list input ERROR" is an error message that appears when the input provided to a program or function is not recognized as a valid number. This could be due to missing or incorrect characters, improper formatting, or other issues with the input.

2. What causes the "Invalid number: incomprehensible list input ERROR" message to appear?

The "Invalid number: incomprehensible list input ERROR" message is typically caused by mistakes in the input provided to a program or function. This could be due to typos, incorrect data types, or other formatting errors.

3. How can I fix the "Invalid number: incomprehensible list input ERROR" message?

To fix the "Invalid number: incomprehensible list input ERROR" message, you will need to carefully review the input you are providing to the program or function. Make sure that it is in the correct format, and that all necessary characters are included. If you are still having trouble, it may be helpful to consult the documentation for the program or function you are using.

4. Can a programming language or tool prevent the "Invalid number: incomprehensible list input ERROR" message?

While some programming languages and tools may have built-in error handling mechanisms that can catch and handle input errors, it is ultimately the responsibility of the programmer to ensure that the input provided is valid. Properly validating and formatting input can help prevent the "Invalid number: incomprehensible list input ERROR" message from appearing.

5. Are there any other common errors similar to "Invalid number: incomprehensible list input ERROR" that I should be aware of?

Yes, there are several other common errors related to input that you should be aware of, such as "type mismatch" errors, "syntax error" messages, and "out of range" errors. It is important to carefully review error messages and troubleshoot any issues with input to ensure your programs and functions are functioning correctly.

Similar threads

  • Programming and Computer Science
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
4K
  • Programming and Computer Science
Replies
3
Views
2K
  • Programming and Computer Science
Replies
2
Views
11K
  • Linear and Abstract Algebra
Replies
6
Views
4K
  • Special and General Relativity
Replies
2
Views
1K
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • Programming and Computer Science
Replies
2
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
Back
Top