MainComputersProgrammingLanguages › Stream Input/Output in Fortran

Stream Input/Output in Fortran

Edit Page
Report
Scan day: 03 March 2014 UTC
1
Virus safety - good
Description: By Clive Page.
Background - Record-based versus Stream I/O Traditionally, and indeed until the advent of Fortran2003, Standard Fortran I/O has been entirely record-based.  This is fine if you are reading or writing a file of records such as a text file, where each line is a record, since it means that  you don't need to be concerned about the record terminators (which, depending on the platform, may be line-feeds, or carriage-returns, or both).  It can, however, be a serious handicap when you want to use Fortran to read a file generated by some instrument, or produced by a package such as a spreadsheet or database system.  Often these files do not have records that Fortran can recognise, or they have a more complex structure than a simple linear sequence of records, but Standard Fortran has not previously provided any means of accessing them simply as a stream of bytes or characters.   Another problem is that sometimes one wants to access the records in some random order, rather than in a strict sequence.  One can do this in Fortran using direct-access files, but these are restricted to files where all records have the same length.  Stream I/O provides solutions to all these problems.
Size: 1193 chars

Contact Information

Email:
Phone&Fax:
Address:
Extended:

WEBSITE Info

Page title:streamIO
Keywords:
Description:
IP-address:143.210.56.104