Path: utzoo!mnetor!uunet!husc6!ut-sally!ut-emx!chpf127 From: chpf127@ut-emx.UUCP (J. Eaton) Newsgroups: comp.os.vms Subject: Re: FORTRAN DOUBLE SPACES PRINTED LINES WITH TABS Message-ID: <1319@ut-emx.UUCP> Date: 23 Mar 88 04:18:04 GMT References: <8803211520.AA00743@ucbvax.Berkeley.EDU> Organization: The University of Texas at Austin, Austin, Texas Lines: 45 Summary: carriage control In article <8803211520.AA00743@ucbvax.Berkeley.EDU>, graham@DRCVAX.ARPA writes: > > OPEN(UNIT=1,TYPE='OLD',NAME=FILE,READONLY,CARRIAGECONTROL='LIST') > . > PRINT 20,LINE > 20 FORMAT(1X,A80) > > If one of you could tell me why this inserts a CRLF after any line > containing a tab, I would be much obliged. > > Dan > graham@drcvax.arpa > ------ It's not inserting a CRLF after the line. It's wrapping because you've opened the file with carriage control='list', but have used the format (1x,a80), which prints 81 characters due to the 1x. The first column in your file is also blank because of the 1x. Solutions: 1. Open the file without the nonstandard carriage control qualifier pro: this is standard fortran con: other programs may do funny things to your file since it will have fortran type carriage control (i.e. the first column of data is interpreted as a carriage control character, hence the need for the 1x in the format) 2. drop the 1x in the format pro: you will be printing only 80 characters and the lines won't wrap. the file will be opened with the carriage control characteristics you want. con: this is not standard fortran J. Eaton Department of Chemical Engineering The University of Texas at Austin Austin, Texas 78712 I've written my fair share of 'em, but still, after all this time, I've never met a FORTRAN program I really liked.