Re: Fortran write(print) problem



Ron Shepard wrote:

(snip with history of ASA, ANSI, and such)

Fortran was originally designed to be consistent with the standard ASA conventions for printed files and to be independent of the underlying character set representation. That meant that list directed formatting was required to begin each line with a space (just in case it were to be printed on an ASA printer). This is also why many fortran programs routinely insert spaces at the beginning of even lines printed with explicit formats (e.g. formats begin with 1x, or 1H , or ' ', or otherwise ensure that there will be a blank space at the beginning). Unix and C were developed after 1969, so they broke with standards compliance and used the idea of embedded control characters using the ASCII character set. Over time, that convention (with some ambiguity about exactly how lines are terminated, CR, CR+LF, or LF) replaced the ASA format first as the de facto standard, and later as the actual standard (e.g. for FTP file transfers and other contexts).

That, and the transition from line at a time printers, such as chain, train, and drum printers, to character at a time printers or printers connected up through a serial line. (The DECwriter and daisy wheel printers were popular hard copy output devices for some years.)

To an IBM 1403 printer, CR and LF are just like any other
character that can be printed in a given column, though usually
they don't print anything.  (I have done it before, as character
constants in Fortran programs.)

Mostly for compatibility reasons, i.e. historical reasons, modern fortran standards have continued to require the space at the beginning of each line in list directed output.

-- glen

.



Relevant Pages

  • Re: Xerox 7760 on DCPS?
    ... I guess I'll check again about 7 -> 8 bit ASCII ... So the queues have to have names ... The printers are not LAT ... I have some postscript code that does character re-encoding (dates back ...
    (comp.os.vms)
  • Printer problem
    ... I have a lot of Printers on our VMS 7.2-1 system, ... Oracle and no character based forms in later versions, ... It says load paper in tray 1, ... it overrides and takes from the bulk paper casette. ...
    (comp.os.vms)
  • Re: long free source form lines
    ... used as a line length on many other printers. ... print a source listing file, with the lines numbered so that ... the nesting structure, ... If 132 character source lines are allowed, ...
    (comp.lang.fortran)
  • Re: String and escape characters
    ... old daysof plaintext printers) triggered the printer to skip to next ... this character is generally used to hide spoilers: ... The hexcode of that char is 0x0C, ...
    (comp.lang.java.programmer)
  • Re: cariage control (was IMPLICIT NONE (F2k8+/-))
    ... It was just a description of how printers worked (according to a separate ASA standard) independent of language considerations. ... I'm afraid it was long enough before my time that I can't explain what it was even doing in the Fortran standard at all. ... Note that unlike ASA carriage control the movement ...
    (comp.lang.fortran)