FIX: F6700: READ with END= and Character FormatsLast reviewed: September 16, 1997Article ID: Q75761 |
5.00 5.10 | 5.00 5.10
MS-DOS | OS/2kbprg kbfile kbappnote kbfixlist kbbuglist
SYMPTOMSPrograms compiled with Microsoft FORTRAN versions 5.0 and 5.1 and run for a period of time can generate the error:
run-time error F6700: -heap space exceeded CAUSEThe three conditions that are necessary to cause this error are:
RESOLUTIONA patched version of a component (PUTERR.OBJ) of the run-time library has been made available as an application note. With the new replacement routines in the PUTERR.OBJ module, the accumulation of allocated memory on the near heap does not occur because the memory used is correctly deallocated following termination of the READ or WRITE statement. Download HF0451.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
STATUSMicrosoft has confirmed this to be a problem in FORTRAN versions 5.0 and 5.1. This problem was corrected in FORTRAN PowerStation.
MORE INFORMATIONThe following code can be used to reproduce the problem:
Sample Code
parameter(n=19000) integer*4 ai integer*1 arr1(n),arr2(n),arr3(n) character*256 str,formstr formstr = '(a)' str = 'this is junk' open(1,file='test.dat') write(1,formstr) str rewind(1) ai = 110 read(1,formstr,end=20) str goto 1020 rewind(1) write(*,*) write(*,*) 'At end of file at iteration ',ai ai=ai+1 goto 10 end |
Additional reference words: 5.00 5.10 HF0451
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |