[comp.lang.fortran] Option in OPEN... which is more prevalent??

jim@jagubox.gsfc.nasa.gov (Jim Jagielski) (11/03/90)

Which option in OPEN to specify "standard" FORTRAN printer carriage control
is more prevalent (and considered most portable)???:

	ACTION='PRINT'

	   - or -


	CARRIAGECONTROL='FORTRAN'


????
--
=======================================================================
#include <std/disclaimer.h>
                                 =:^)
           Jim Jagielski                    NASA/GSFC, Code 711.1
     jim@jagubox.gsfc.nasa.gov               Greenbelt, MD 20771

"Kilimanjaro is a pretty tricky climb. Most of it's up, until you reach
 the very, very top, and then it tends to slope away rather sharply."

silvert@cs.dal.ca (Bill Silvert) (11/05/90)

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?
-- 
William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2.  Tel. (902)426-1577
UUCP=..!{uunet|watmath}!dalcs!biomel!bill
BITNET=bill%biomel%dalcs@dalac	InterNet=bill%biomel@cs.dal.ca

bcphyagi@Twg-S5.uucp (Stephen Walton) (11/06/90)

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!

ereiamjh@jhunix.HCF.JHU.EDU (Tom B. O'Toole) (11/06/90)

I would recommend carriagecontrol='list', rather than carriagecontrol='none'
for regular text files. This will create a normal "carriage return carriage
control" Rms file, like most VMS utilities create by default.

-- 
Tom O'Toole - ecf_stbo@jhuvms.bitnet - JHUVMS system programmer 
Homewood Computing Facilities, Johns Hopkins University, Balto. Md. 21218 
ease!Trim!eeeaaaassse!trimtrimtrimeeeeeeaaaaassetrimease!trim!ease!trimeaase

tholen@uhccux.uhcc.Hawaii.Edu (David Tholen) (11/07/90)

In article bcphyagi@Twg-S5.uucp (Stephen Walton) writes:
 
> 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.

I have.  Saw it in a UNIX f77 compiler under BSD 4.1 or 4.2, as I recall.  The
purpose was to alter the default treatment of carriage control.  Files
ultimately destined for a printer could be written to disk using ACTION='PRINT'
so that carriage control characters could be inserted into the file.  For
example, a '1' as the first character of an output record would be converted
to a formfeed character if ACTION='PRINT' were in effect.