This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch,libfortran] PR37834 write(*,'(f0.0)') 0.0 prints "." instead of "0."


Hi Jerry,

Jerry DeLisle wrote:
> The following patch fixes the test case for this PR by setting
> width to 2 for the special case of w == 0 and value of zero.

Thanks.

> I also handles one other special case with f1.0 as format specifier.
> Before this patch, gfortran would print '.' which seems of not much
> value.

I think the proper way is as NAG f95 does: "*" as "0." does not fit
and both the "0" and the "." seem to be required by the standard.
All my other compilers print ".". I think "0" is more readable and
for READing both "0" and "." yield 0.0. Thus I think the change is
fine.

> OK to commit with an appropriate test case?
OK thanks for quickly fixing this.

Tobias


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]