流输入/输出在Fortran

C. Page
{"title":"流输入/输出在Fortran","authors":"C. Page","doi":"10.1145/1105755.1105757","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":379614,"journal":{"name":"ACM SIGPLAN Fortran Forum","volume":"43 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2005-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":"{\"title\":\"Stream input/output in Fortran\",\"authors\":\"C. Page\",\"doi\":\"10.1145/1105755.1105757\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"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.\",\"PeriodicalId\":379614,\"journal\":{\"name\":\"ACM SIGPLAN Fortran Forum\",\"volume\":\"43 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2005-12-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"1\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"ACM SIGPLAN Fortran Forum\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1105755.1105757\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM SIGPLAN Fortran Forum","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1105755.1105757","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

摘要

传统上,直到Fortran2003出现之前,标准Fortran I/O都是完全基于记录的。如果您正在读取或写入记录文件(例如文本文件,其中每行都是一条记录),这是很好的,因为这意味着您不需要关心记录终止符(根据平台的不同,可能是换行符或回车符,或两者兼而有之)。但是,当您希望使用Fortran读取由某些工具生成的文件,或者由电子表格或数据库系统等软件包生成的文件时,这可能是一个严重的障碍。通常这些文件没有Fortran可以识别的记录,或者它们具有比简单的线性记录序列更复杂的结构,但是标准Fortran以前没有提供任何简单地作为字节流或字符流访问它们的方法。另一个问题是,有时希望以某种随机顺序访问记录,而不是按照严格的顺序访问记录。在Fortran中可以使用直接访问文件来实现这一点,但这些文件仅限于所有记录具有相同长度的文件。流I/O为所有这些问题提供了解决方案。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Stream input/output in Fortran
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信