FIX: Z Format Hangs Machine with String > 130 Bytes

Last reviewed: September 16, 1997
Article ID: Q84576
5.10 | 5.10 MS-DOS | OS/2 kbtool kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS, version 5.1
  • Microsoft FORTRAN for OS/2, version 5.1

SYMPTOMS

Programs that contain a string or substring larger than 130 bytes in size that is output with a Z edit descriptor may hang the machine or cause a protection violation under OS/2 or Windows.

RESOLUTION

To use the Z edit descriptor with strings larger than 130 bytes in size, use an implied DO-loop to output a single byte of the larger string at a time.

STATUS

Microsoft has confirmed this to be a problem in FORTRAN version 5.1. This problem was corrected in FORTRAN PowerStation, version 1.0.

MORE INFORMATION

Sample Code #1

The following code reproduces the problem:

      character*131 c

      c = 'this is a test'
      write(*, '(1x,z)') c
      end

Sample Code #2

The following code will not cause the problem:

      character*131 c

      c = 'this is a test'
      write( *,'(1x,200z)') ( c(i:i),i=1,131 )
      end


Additional reference words: 5.10 halt buglist5.10 fixlist1.00
KBCategory: kbtool kbfixlist kbbuglist
KBSubCategory: FLIss
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.