Re: Formatting a print statement

From: Richard E Maine (nospam_at_see.signature)
Date: 02/28/05


Date: Mon, 28 Feb 2005 12:42:28 -0800

In article <38hbm2F5m9bkoU1@individual.net>,
 "Gottfried von Korinth" <karlmueller@gmx.net> wrote:

> (Actually, I did not figure out, how that write works: I came up with
> something like
> write (*,'number: ',advance='NO')
> and do not understand, why my first try
> write (*,advance='NO') "number: "
> does not work. It may be that I stuble upon the difference between formatted
> and unformatted write?)

Well.... yes. There is a *HUGE* difference between formatted and
unformatted. Fundamentally, unformatted is not mean for human
consumption at all. This has nothing in particular to do with advancing
vs nonadvancing. It has much more to do with the fact that standard
output is a formatted file and thus you can't do unformatted output to
it. (Some systems might let you get by with doing unformatted output to
a formatted file, but that's not part of standard Fortran, and is
definitely in the category of system-dependent trickery).

I suspect that you may be getting confused by a common terminology
error. Many people incorrectly refer to list-directed formatting as
unformatted. While I don't see that particular error above, it is
possible that the above is a consequence of the confusion that often
results from thinking that list-directed and unformatted are the same
thing.

(There is a set of parens missing from the first example, but that's
just a trivial syntax detail not very relevant to the matter).

-- 
Richard Maine                       |  Good judgment comes from experience;
email: my first.last at org.domain  |  experience comes from bad judgment.
org: nasa, domain: gov              |        -- Mark Twain


Relevant Pages

  • Re: Formatted output and new_line(a) on " " systems
    ... You are talking about list-directed formatting, ... This is the first I recall of someone refering to list directed files as "unformatted" but I can understand that confusion as well. ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: Formatted IO of huge/tiny values
    ... List-directed formatting is a form of formatted. ... contrast is something like list-directed formatting versus explicit ... So the incorrect terminology leads to ...
    (comp.lang.fortran)
  • Re: I/O reading formated files
    ... please note that you appear to have made a common terminology ... confusion (for example, they open a file as "unformatted" because they ... formatting - list-directed formatting and explicit formatting. ... There are many circumstances in which list-directed input does the ...
    (comp.lang.fortran)
  • Re: Weird date formatting
    ... Christine wrote: ... different nationalities in the office where each person enters the date differently: ... To eliminate confusion, for example, I've formatted a ... The only time it works is if you actually enter the short-form month and year, which is kinda missing the point of formatting the cell to begin with. ...
    (microsoft.public.excel.newusers)
  • Re: Formatted IO of huge/tiny values
    ... difference, use formatted output. ... But I will add my standard knee-jerk reply to the incorrect terminology. ... List-directed formatting is a form of formatted. ...
    (comp.lang.fortran)