[comp.os.vms] FORTRAN CARRIAGE CONTROL REVEALED

JWMANLY@AMHERST.BITNET.UUCP (09/18/87)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hello everyone.

Well, after much more experimentation and further manual and microfiche
reading, I have determined what was going on with my fortran carriage control
problem.

Basically I was misled by the RMS manual and the terminal driver.

It turns out the RMS manual was wrong in its description of the different
types of carriage control.  In particular, everywhere it said "line feed",
it should have said "new line".  A fine but important distinction, since
a new line consists of a carriage return followed by a line feed.

Thus, for example, where the RMS manual says WRT fortran "0" carriage control:
(p 5-23)

    "sequence: line feed, line feed, print buffer contents, carriage return"

it should have said

    "sequence: new line, new line, print buffer contents, carriage return"

(it IS phrased correctly in the I/O User's Guide, p8-36).  Note please that
"new line" means "carriage return, line feed".

Now, I would have caught my mistake sooner, except that the terminal driver
does something very strange:  Multiple carriage returns output to a terminal
are discarded.  Try it.  Create a file with three carriage returns in a row,
and type it to your screen in "display control chars" mode, and you will see
only ONE carriage return character.

So, the mystery is solved.  The formatting is done on a record by record
basis independently, but the terminal driver drops multiple carriage returns.

Thanks to anybody who took the time to read these items.

BITNET: JWMANLY@AMHERST                   John W. Manly
PHONE:  (413)-542-2526                    System Manager
                                          Amherst College

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~