Microsoft KB Archive/59229

= FIX: Leading Zeros with &quot;P&quot; Edit Descriptor and Zero Value =

Article ID: 59229

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.0

-



This article was previously published under Q59229



SYMPTOMS
When an application uses the &quot;P&quot; edit descriptor, the value zero may print with leading zero digits (to the left of the decimal point).



STATUS
Microsoft has confirmed this to be a problem in FORTRAN version 5.0 for MS-DOS and OS/2. This problem was corrected in FORTRAN version 5.1 for MS-DOS and OS/2.



MORE INFORMATION
The &quot;P&quot; edit descriptor provides a &quot;scale factor&quot; for output and is useful to print percentages. The following code example demonstrates this problem. When compiled with FORTRAN version 5.0, the value VAR1 prints with leading zero digits.

Sample Code
C Compile options needed: None

VAR1 = 0.0000 VAR2 = 0.0123 WRITE (*, '(3P, 1X, 2F10.5)') VAR1, ! outputs 000.00000 +                             VAR2   ! outputs 12.30000 END

Additional query words: 5.00 buglist5.00 fixlist5.10

Keywords: kbfix KB59229

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.