How to handle empty txt files when reading data in Fortran 90?

  • Fortran
  • Thread starter toni_2374
  • Start date
  • Tags
    Data Fortran
In summary, open read data in fortran 90 is a feature that allows fortran 90 programs to read data from external sources. Its main benefits include increased flexibility and efficiency, as well as easier integration of data into programs. There are multiple methods for reading open data, such as the "read" statement and the "read()" function. This feature can handle large data sets, but may have limitations when it comes to non-standard sources or formats and requires programming knowledge to use effectively.
  • #1
toni_2374
6
0
Hi
I have a problem with reading data in fortran 90. my programs try to read a txt file that only contains one number in it but if the txt file is empty it stops. i want to make it continue what should i do?
 
Technology news on Phys.org
  • #2
Look up the ERROR= option for the READ statement.
 
  • #3
Even better, look up the END= option.

ERROR= might pick up any type of error, not just that the file doesn't contain enough data.
 

What is open read data in fortran 90?

Open read data in fortran 90 is a feature that allows fortran 90 programs to read data from external sources, such as files or databases.

What are the benefits of using open read data in fortran 90?

One of the main benefits of using open read data in fortran 90 is that it allows for more flexibility and efficiency in reading data from external sources. It also allows for easier integration of data into fortran 90 programs.

What are the different methods of reading open data in fortran 90?

There are several methods for reading open data in fortran 90, including using the "read" statement, the "read*" statement, and the "read()" function. Each method has its own advantages and may be more suitable for different types of data.

Can open read data in fortran 90 handle large data sets?

Yes, open read data in fortran 90 can handle large data sets. The size of the data set that can be handled depends on the available memory and processing power of the computer.

Are there any limitations to open read data in fortran 90?

One limitation of open read data in fortran 90 is that it may not be able to read data from non-standard sources or formats. It also requires some knowledge of fortran 90 programming to properly implement and utilize.

Similar threads

  • Programming and Computer Science
Replies
21
Views
450
  • Programming and Computer Science
Replies
3
Views
356
  • Programming and Computer Science
Replies
12
Views
2K
  • Programming and Computer Science
2
Replies
41
Views
3K
  • Programming and Computer Science
Replies
12
Views
3K
  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
Replies
32
Views
2K
  • Programming and Computer Science
Replies
22
Views
905
  • Programming and Computer Science
Replies
1
Views
3K
  • Programming and Computer Science
Replies
5
Views
1K
Back
Top