FIX: Z Format Hangs Machine with String > 130 Bytes

ID: Q84576


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 query words: 5.10 halt buglist5.10 fixlist1.00

Keywords :
Version : :5.1
Platform :
Issue type :


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