FIX: F1901 or Hang Compiling, NAMELIST Listed in Internal READ

Last reviewed: September 11, 1997
Article ID: Q69071
5.00 | 5.00 MS-DOS | OS/2 kbtool kbfixlist kbbuglist kberrmsg kbcode

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS and OS/2, version 5.0

SYMPTOMS

An attempt to compile an application in the MS-DOS operating system fails and the compiler generates the following message:

   F1901:  Program too large for memory

An attempt to compile the application in the OS/2 operating system fails and a protection violation occurs.

An attempt to compile the application with the High-Capacity Compiler, F1L.EXE, in the MS-DOS operating system fails and the computer hangs. An attempt to compile the application with the patched versions of F1.EXE and F1L.EXE fails with the same results as the unpatched version of each file.

CAUSE

The application contains an internal READ from a character variable into a NAMELIST.

RESOLUTION

To work around this problem, modify the source code to use an external READ to place character data into a NAMELIST. If necessary, store date from the application into a scratch file and read the data from the file into the NAMELIST.

STATUS

Microsoft has confirmed this to be a problem in FORTRAN version 5.0 for MS-DOS and OS/2. This problem was corrected in FORTRAN version 5.1 for MS-DOS and OS/2.

MORE INFORMATION

The following code example demonstrates this problem.

Sample Code #1

C Compile options needed: None

      CHARACTER*21 TEST /' &IN X=1 Y=5 Z=10 /'/
       NAMELIST /IN/ X, Y, Z
       READ(TEST, IN)
      END

The following code example demonstrates one method to work around this problem.

Sample Code #2

C Compile options needed: None

       OPEN(8, FILE = 'TEST.DAT')
       NAMELIST /IN/ X, Y, Z
       READ(8, IN)
       WRITE(*, IN)
       CLOSE(8)
       END

Date File TEST.DAT

&in x=1 y=5 z=10 /

The following code example demonstrates another method to work around this problem.

Sample Code #3

C Compile options needed: None

       CHARACTER*21 TEST /' &IN X=1 Y=5 Z=10 /'/
       NAMELIST /IN/ X, Y, Z
       OPEN(8)
       WRITE(8, *) TEST
       REWIND(8)
       READ(8, IN)
       WRITE(*, IN)
       CLOSE(8)
       END


Additional reference words: 5.00 buglist5.00 fixlist5.10
KBCategory: kbtool kbfixlist kbbuglist kberrmsg kbcode
KBSubCategory: FLIss
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 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.