Path: utzoo!attcan!uunet!lll-winken!elroy.jpl.nasa.gov!usc!csun!Twg-S5!bcphyagi From: bcphyagi@Twg-S5.uucp (Stephen Walton) Newsgroups: comp.lang.fortran Subject: Re: Option in OPEN... which is more prevalent?? Message-ID: <1990Nov5.232004.17911@csun.edu> Date: 5 Nov 90 23:20:04 GMT References: <3798@dftsrv.gsfc.nasa.gov> <1990Nov5.010617.24189@cs.dal.ca> Sender: news@csun.edu (News Administrator) Distribution: na Organization: csun Lines: 31 In article <1990Nov5.010617.24189@cs.dal.ca> bill%biomel@cs.dal.ca writes: >In article <3798@dftsrv.gsfc.nasa.gov> jim@jagubox.gsfc.nasa.gov (Jim Jagielski) writes: >> >>Which option in OPEN to specify "standard" FORTRAN printer carriage control >>is more prevalent (and considered most portable)???: >> >> ACTION='PRINT' >> >> - or - >> CARRIAGECONTROL='FORTRAN' > >I'm at home without a copy of the standard, but checking my memory and >Meissner and Organick, neither seems standard. Can someone clarify >where these extensions come from? The CARRIAGECONTROL='FORTRAN' comes from VMS. Basically, it has to do with how the first character of a formatted record is to be handled. "Normally", when writing to a disk file, you would do "CARRIAGECONTROL='NONE', meaning that all characters in the WRITE statement go unfiltered to the disk file. This is how Unix behaves, for example. (The fcat(1) filter interprets the first character of each line of its standard input according to Fortran carriage control specs.) CARRIAGECONTROL='FORTRAN' means, essentially, assume I'm writing to a printer. Under VMS, the above actually doesn't change what is written to the file; it simply gives the files records the FORTRAN record attribute. For what it's worth, most non-DEC compilers seem to adopt the CARRIAGECONTROL= form. I've used a lot of compilers, and I've never seen ACTION=PRINT. -- Stephen R. Walton, Dept. of Physics and Astronomy, Cal State Northridge I am srw@csun.edu no matter WHAT the stupid From: line says!