FIX: Tab Edit Descriptor Fails Crossing Buffer Boundary

Last reviewed: September 16, 1997
Article ID: Q80237
5.00 5.10 | 5.00 5.10
MS-DOS    | OS/2
kbprg kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS, versions 5.0 and 5.1
  • Microsoft FORTRAN for OS/2, versions 5.0 and 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 reference words: 5.10 buglist5.10 fixlist1.00
KBCategory: kbprg kbfixlist kbbuglist
KBSubCategory: FORTLngIss
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.