BUG: F2707 on an Internal Read or Write to Record Element

Last reviewed: July 13, 1995
Article ID: Q118433
The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, version 5.1
  • Microsoft FORTRAN PowerStation for MS-DOS, versions 1.0 and 1.0a
  • Microsoft FORTRAN PowerStation 32 for Windows NT, version 1.0

SYMPTOMS

A program that uses a character string that is a member of an element in an array of records as an internal file gets the following error when compiling:

   error F2707: illegal unit specifier

STATUS

Microsoft has confirmed this to be a bug in FORTRAN for MS-DOS, version 5.1, the FORTRAN PowerStation for MS-DOS, versions 1.0 and 1.0a, and the FORTRAN PowerStation 32 for Windows NT, version 1.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Reading or writing to a string used as an internal file generates a compiler error if the string is a member of an element of an array of records.

To demonstrate the problem, compile the sample code below. If "r" were a single record (not an array), or if "r" were an array of character strings (not records), the sample code would compile without error.

Sample Code

c compile options needed: none

      structure /s/
        character*6 cvar
      end structure
      record /s/ r(10)
      write (r(1).cvar,'(I6)') 123
      end


Additional reference words: 5.10 1.00 1.00a
KBCategory: kbtool kbbuglist
KBSubcategory: FL32Iss


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: July 13, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.