FIX: Leading Zeros with "P" Edit Descriptor and Zero ValueLast reviewed: September 11, 1997Article ID: Q59229 |
5.00 | 5.00
MS-DOS | OS/2
kbprg kbbuglist kbfixlist
The information in this article applies to:
SYMPTOMSWhen an application uses the "P" edit descriptor, the value zero may print with leading zero digits (to the left of the decimal point).
STATUSMicrosoft 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 INFORMATIONThe "P" edit descriptor provides a "scale factor" 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 CodeC 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 reference words: 5.00 buglist5.00 fixlist5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |