PRB: WRITE with "0" Carriage Control, Triple-Spaced Output
PSS ID Number: Q10624
Article last modified on 02-09-1993

3.13 3.20

MS-DOS


----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft FORTRAN for MS-DOS, versions 3.13, 3.2
----------------------------------------------------------------------

Summary:

SYMPTOMS
   When an application performs a WRITE to unit "*" using the "0"
   carriage-control specifier, the output is triple-spaced (two blank
   lines).

CAUSE
   The application previously performed a READ from unit "*".

RESOLUTION
   To work around this problem, do not use the "0" carriage-control
   specifier when a WRITE to unit "*" follows a read from unit "*".
   Use an empty WRITE (*, *) statement to insert the blank line.

STATUS
   Microsoft has confirmed this to be a problem in FORTRAN versions
   3.13 and 3.2 for MS-DOS. The problem was corrected in FORTRAN
   version 3.3 for MS-DOS.

More Information:

The following code example demonstrates this problem.

Sample Code
-----------

C Compile options needed: None

      CHARACTER*1 INA(73)
      WRITE(*, '(A)') ' REFERENCE LINE.'
      READ(*, '(73A1)') INA
      WRITE(*, '(A)') '0< USING "0" HERE, DOUBLE SPACE GIVES TRIPLE'
      WRITE(*, '(A)') '0DOUBLE SPACED.'
      WRITE(*, '(A)') '0DOUBLE SPACED'
      END

Additional reference words: 3.13 3.20

=============================================================================

Copyright Microsoft Corporation 1993.
