FIX: Leading Zeros with "P" Edit Descriptor and Zero Value

ID: Q59229


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, version 5.0
  • Microsoft FORTRAN for OS/2, version 5.0


SYMPTOMS

When an application uses the "P" 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 "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 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 :
Version : :5.0
Platform :
Issue type :


Last Reviewed: November 1, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.