BUG: Incorrect Output with CARRIAGECONTROL='fortran' OptionLast reviewed: March 28, 1996Article ID: Q149146 |
The information in this article applies to:
SYMPTOMSWhen you perform a formattted write operation to a file explicitly opened with the CARRIAGECONTROL='fortran' option, the leading space passed with the input data is not used as a carriage control.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONIn the following sample code, the File1.out file opened with the option CARRIAGECONTROL='fortran' does not use the space created with the "1X" positional edit descriptor in the WRITE statement as a carriage control. Instead, the very first character in the variable "line" is incorrectly interpreted as a carriage control. File2.out does not use the Fortran carriage control option, so both the space and the character string are correctly written to the file with no problems.
Sample Code to Illustrate ProblemC Compile options needed: none
character*50 line line = 'carriage control' open(12,file='file1.out', carriagecontrol='fortran') open(14,file='file2.out') WRITE(12,'(1X,A50)') line ! 1X not used as carriage control WRITE(14,'(1X,A50)') line ! 1X used as carriage control WRITE(*,'(1X,A50)') line close(12) close(14) endOutput - Screen: carriagecontrol Output - File1.out:
arriagecontrolOutput - File2.out:
carriagecontrol |
Additional reference words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |