Re: F format for reals



Now that every person I expected to have a go, did, I'd like to add this:

If I read "optional" in the user's or reference manual of a Fortran
compiler, I eEXPECT to be able to choose what will appear, not that the
compiler seems to toss a coin and decide for you in each case.
Sometimes I could not find a cast-iron simple method, hence my use of
internal writes and deliberate insertion of the sign and leading zero when
needed, before writing an output character string.
At least, this allowed me to use two different compilers and get the same
visual result.

The problem I referred to, is that with the compilers I was using, the word
"optional" appeared, but I found no way to actually force the issue of
leading zero. In one the case the combination of w and d in Fw.d made a
difference as to whether the leading zero appeared ot not, or else the
appearence of w asterisks to indicate the runtime editor felt it could not
comply.

Hence the work-around I mentioned.

I applaud John Harper's practical approach of testing several compilers.

..

..




.



Relevant Pages

  • Re: zero-initialization of variables
    ... to zero in the beginning of the relevant subroutine. ... ALWAYS initialize variables before using them. ... Some compilers for older version of Fortran leave whatever ... compilers even produce a run-time error if a variable is used without first ...
    (comp.lang.fortran)
  • Re: zero-initialization of variables
    ... Do some compilers do this by default (zero variables by default)? ... In order to have a chance of emulating past compilers which had auto-save and default initialization, the save status would have to be dealt with. ... standard (or a similarly named section in other versions of the ... Failing to comply with standards not only inhibits portability; it may severely restrict success with optimizations, including parallel execution. ...
    (comp.lang.fortran)
  • Re: zero-initialization of variables
    ... to zero in the beginning of the relevant subroutine. ... ALWAYS initialize variables before using them. ... I'll leave this to the language lawyers but Chapman's Fortran 95/2003 For ... Some compilers for older version of Fortran leave whatever ...
    (comp.lang.fortran)
  • Re: zero-initialization of variables
    ... uninitialized variables to zero, and some set them to different arbitrary ... Some compilers for older version of Fortran leave whatever ... compilers even produce a run-time error if a variable is used without first ...
    (comp.lang.fortran)
  • Re: longjmp from a signal handler ... kosher?
    ... integer division by zero occurs. ... At least my implementation for exceptions ... was not able to rely on SIGFPE when this compilers were used. ...
    (comp.lang.c)