FIX: Tab Edit Descriptor Fails Crossing Buffer Boundary

ID: Q80237


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


SYMPTOMS

When the following conditions are met

  1. Output is placed in a record position that is beyond the number of bytes held by the I/O buffer.


  2. The FORMAT edit descriptor tabs back to a position that is within the number of bytes held by the I/O buffer.


  3. Output is written on top of the existing output that is immediately after the I/O buffer boundary.


the initial data that was output prior to the backwards tab will not be overwritten by the new output. This will only occur with output immediately following the I/O buffer boundary.


RESOLUTION

Since it is difficult to determine if a tab operation is going to cross an I/O buffer boundary, it is best to avoid tabbing back behind and overwriting existing output in a record. If the size of the I/O buffer is increased to a larger number, there will be fewer buffer boundaries and the probability of encountering this problem will be decreased.


STATUS

Microsoft has confirmed this to be a bug in the products listed above. This problem was corrected in FORTRAN PowerStation, version 1.0.


MORE INFORMATION

The following code can be used to reproduce the problem:

Sample code


       open(1,file='test.dat',blocksize=1024)
       write(1,10) '@@@@@@@@@@@@@@',123,456,789
10     format(1024x,a,t1010,3i10)
       end 
Output (at end of file test.dat):
123 @@@ 789

Additional query words: 5.10 buglist5.10 fixlist1.00

Keywords :
Version : :5.0,5.1
Platform :
Issue type :


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