BUG: Initialization Problem with FORTRAN and Basic (79825)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 5.0
- Microsoft FORTRAN compiler for OS/2 5.1
This article was previously published under Q79825 SYMPTOMS
Mixed-language programs with Microsoft FORTRAN 5.0 or 5.1 and Microsoft
Basic 7.1, in which the FORTRAN code opens a file or accesses the near
heap, can stop the machine upon execution. This problem occurs while
running the program under both MS-DOS and OS/2.
CAUSE
Basic calls its heap initialization sequence twice and FORTRAN calls its
initialization sequence once. The second time Basic calls its
initialization sequence, it overwrites the information that FORTRAN
requires to do file I/O.
RESOLUTION
The Basic program must explicitly call the FORTRAN initialization routine
before calling any other FORTRAN routine that does file I/O. It should be
called only once, typically at the start of the Basic main program. This
routine will rewrite the required FORTRAN file structure information and
allow FORTRAN file I/O to function correctly.
STATUS
Microsoft has confirmed this to be a problem in Microsoft FORTRAN version
5.0 and 5.1 for MS-DOS and OS/2. We are researching this problem and will
post new information here as it becomes available.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbLangFortran KB79825 |
---|
|