Re: Fortran write(print) problem



In article <43101BF9.6040506@xxxxxxxxxxxxxxxxxx>,
Brooks Moses <bmoses-nospam@xxxxxxxxxxxxxxxxxx> wrote:

> Yes. You've specified "*" formatting, which means (essentially) that
> you don't care about the details of how it looks so long as you can read
> it. Some compilers print out *-formatted lines with spaces in front of
> them; some don't.

Those that don't were violating the standard. To my knowledge, most or
all of them have been fixed (possibly with compiler switches to ask for
the nonstandard behavior).

Although I agree (and have regularly said) that the general rule is that
* formatting is for when you don't care about the details, this
particular case is not even a matter where the compiler might or might
not do what you want. In this case, the standard actually *REQUIRES*
the compiler to do what you don't want (even if some compilers have been
known to violate the standard). The reasons for that are historical.

Brooks gave the recommended solution, which I won't repeat.

--
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: reading two separate files
    ... However it DOES work with Microsoft F77 compiler on program "A.FOR" ... Microsoft violating a standard! ...
    (comp.lang.fortran)
  • Re: Small language changes
    ... the C standard takes great care not to draw such a line. ... the compiler and the "C library" is a Unix Tradition and it is not fully ...
    (comp.lang.java.programmer)
  • Re: [PATCH] mask ADT: new mask.h file [2/22]
    ... don't care invariant ... These invariants can be changed transparently. ... semantics while not incurring the overhead of indirection for smaller ... Compiler-specific operational semantics and compiler version ...
    (Linux-Kernel)
  • Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures
    ... The compiler can also reorder non-volatile accesses. ... (which you definitely _do_ care about). ... The compiler is prohibited from moving a volatile access across a sequence ...
    (Linux-Kernel)
  • Re: Aspiring highest-order programmer
    ... There's no reason a compiler can't emit object code. ... > Probably not, but i do think that one, as driver, become more 'at one' ... > with your car when you've at least done some mechanical work yourself. ... Otherwise you may not care for your car ...
    (comp.programming)