DOCERR: "Scratch Files Can Have Names," Reference Manual States

Last reviewed: July 17, 1995
Article ID: Q23465
The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 4.0, 4.01, 4.1, 5.0
  • Microsoft FORTRAN for OS/2, versions 4.1, 5.0

SUMMARY

The Microsoft FORTRAN Optimizing Compiler "Language Reference" manual for versions 4.0, 4.01, and 4.1 and the Microsoft FORTRAN "Reference" manual for version 5.0 state that an application can open a named file with STATUS = 'SCRATCH.' These statements appear on page 253 for versions 4.x and page 206 for version 5.0.

These statements are incorrect and are contrary to ANSI FORTRAN specification (see page 12-19). The FORTRAN compiler generates the following run-time error when an application specifies STATUS = 'SCRATCH' for a named file:

   F6301 : SCRATCH illegal for named file

NOTE: This feature is supported in FORTRAN PowerStation.

MORE INFORMATION

The following code example demonstrates this run-time error:

Sample Code #1

C Compile options needed: None

      OPEN(6, FILE = 'JUNK', STATUS = 'SCRATCH')
      END

To implement a named scratch file, open the file without a STATUS specification and close the file with STATUS = 'DELETE.' The following code example demonstrates this technique.

Sample Code #2

C Compile options needed: None

     OPEN(1, 'FILE = TEST.DAT')
     CLOSE(1, STATUS = 'DELETE')
     END


Additional reference words: 4.00 4.01 4.10 5.00 5.10 FORTRAN 77 docerr
KBCategory: kbprg kbdocerr
KBSubcategory: FORTLngIss


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