Troubleshooting Incomprehensible List Input in Fortran 77 Program

  • Thread starter Thread starter snowdrop
  • Start date Start date
  • Tags Tags
    Input List
AI Thread Summary
The discussion centers on an error encountered while running a Fortran 77 program compiled with g77, specifically an "invalid number: incomprehensible list input" error during internal I/O operations. The user is attempting to read a list of data files from a text file but is unsure why the error occurs, as the program appears correct and the list is declared properly. The error is clarified as stemming from the format of the data in the file being read. It is noted that when using list-directed I/O for character strings, the file names must be enclosed in quotes. Alternatively, to read character data without quotes, a formatted read using the 'A' format specifier should be employed. This insight provides a solution to the user's issue with file reading in Fortran.
snowdrop
Messages
1
Reaction score
0
Hi all,

I am trying to run a fortran 77 program which was compiled using g77 and it comes up with the following error ::

invalid number: incomprehensible list input
apparent state: internal I/O
lately reading sequential formatted internal IO
Abandon


:confused:

I want the program to read some data files and analyse them so I have written the list like this ::

file01.dat
file02.dat
file03.dat
file04.dat

I have no idea why this error is coming up... I have checked the program and he seems fine and I have declared the list in the declarations. The part of code used to open the file with the list of data files is the following ::

open (20,file=liste(1:lliste),form='formatted',status='old')

If anyone has any ideas what the problem could be.. :frown:

Thanks in advance :bugeye:
 
Technology news on Phys.org
The error message is about a read statement, not an open statement. If says the data in the file was in the wrong format.

If you want to do read character strings with list-directed I/O like

character*50 liste
read(*,*) (liste)

then the character strings in the data file must be in quotes

'file1.dat'
'file2.dat'
...

To read character data without the quotes, do a formatted read using A format:

read(*,'A') (liste)
 
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...
What percentage of programmers have learned to touch type? Have you? Do you think it's important, not just for programming, but for more-than-casual computer users generally? ChatGPT didn't have much on it ("Research indicates that less than 20% of people can touch type fluently, with many relying on the hunt-and-peck method for typing ."). 'Hunt-and-peck method' made me smile. It added, "For programmers, touch typing is a valuable skill that can enhance speed, accuracy, and focus. While...
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

Replies
25
Views
3K
Replies
16
Views
4K
Replies
3
Views
2K
Replies
2
Views
3K
Replies
2
Views
1K
Replies
2
Views
2K
Replies
8
Views
2K
Replies
6
Views
2K
Replies
33
Views
2K
Replies
1
Views
1K
Back
Top