FIX: Tab Edit Descriptor Fails Crossing Buffer Boundary (80237)



The information in this article applies to:

  • Microsoft FORTRAN Compiler for MS-DOS 5.0
  • Microsoft FORTRAN Compiler for MS-DOS 5.1
  • Microsoft FORTRAN compiler for OS/2 5.0
  • Microsoft FORTRAN compiler for OS/2 5.1

This article was previously published under Q80237

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


Modification Type:MajorLast Reviewed:12/1/2003
Keywords:kbfix KB80237