This is the mail archive of the
mailing list for the GCC project.
Re: [patch,libfortran] PR37834 write(*,'(f0.0)') 0.0 prints "." instead of "0."
- From: Tobias Burnus <burnus at net-b dot de>
- To: Jerry DeLisle <jvdelisle at verizon dot net>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 19 Oct 2008 11:50:33 +0200
- Subject: Re: [patch,libfortran] PR37834 write(*,'(f0.0)') 0.0 prints "." instead of "0."
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.
> I also handles one other special case with f1.0 as format specifier.
> Before this patch, gfortran would print '.' which seems of not much
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
> OK to commit with an appropriate test case?
OK thanks for quickly fixing this.