Microsoft KB Archive/84576

= FIX: Z Format Hangs Machine with String > 130 Bytes =

Article ID: 84576

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 5.1
 * Microsoft FORTRAN Compiler 5.1

-



This article was previously published under Q84576



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.



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: kbfix KB84576

-

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

© Microsoft Corporation. All rights reserved.