PSS ID Number: 125468
Article Last Modified on 11/3/1999
CHARACTER*16 str(10, 6400)eliminates the error in both cases.
/* Compile options needed: /MW
*/
PROGRAM testmem
C QuickWin application so we can use more than 640K
C
C Create an allocatable array over 64K
CHARACTER*12 str[ALLOCATABLE, HUGE](:,:)
C Creating the array statically produces the F2120 error
C CHARACTER*12 str(10, 6400)
INTEGER istat
C The allocate should fail with error 2120
C since a single string crosses a segment boundary
C but instead produces an error 6700
C indicating heap space limit exceeded
ALLOCATE(str(10, 6400), stat=istat)
PRINT*, "Error code (0 is success) = ", istat
IF(istat .eq. 0) THEN
DEALLOCATE(str)
END IF
END
Additional query words: 5.10 fail memory allocation
Keywords: KB125468
Technology: kbAudDeveloper kbFORTRAN510DOS kbFortranSearch kbZNotKeyword3