Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!ux1.cso.uiuc.edu!hirchert From: hirchert@ux1.cso.uiuc.edu (Kurt Hirchert) Newsgroups: comp.lang.fortran Subject: Re: another side effect question Message-ID: <1990Aug21.155516.6175@ux1.cso.uiuc.edu> Date: 21 Aug 90 15:55:16 GMT References: Organization: University of Illinois at Urbana Lines: 36 In article peter@ficc.ferranti.com (Peter da Silva) writes: >Speaking of internal I/O, how come you can't do list-directed formatting >in an internal I/O statement (or, if you can, how long has this been >true so I can bitch to a vendor)? Consider the following: 1. The formats produced by list-directed output are processor-dependent; so are the criteria for moving to the next record. This would make it nearly impossible to use list-directed output to an internal file in a portable fashion, since you would know neither how big to make the records of the internal file nor how many of them to provide. Since the whole point of standards is portability (at some level), the argues against standardizing list-directed output to internal files. 2. On the other hand, the formats used for list-directed input are determined by the data itself. This would make it quite easy to use list-directed input from internal files in a portable fashion. This argues in favor of standardizing list-directed input from internal files. 3. People expect input and output to be symmetric and are likely to complain if a form of input is allowed without allowing the corresponding form of output. This argues against standardizing list-directed input from internal files without standardizing list-directed output to internal files. There is no way to satisfy all three of these arguments. When FORTRAN 77 was written, X3J3 chose points 1 and 3 and prohibited all list-directed input/output to internal files. When X3J3 was working on Fortran 90, it went with points 2 and 3 instead, and list-directed input/output to internal files is permitted. (You will have to make up your own mind about whether you want to push your vendor for Fortran 90 in order to get this feature.) -- Kurt W. Hirchert hirchert@ncsa.uiuc.edu National Center for Supercomputing Applications