DOCERR: $LARGE Not Identical to /AH with Local Arrays (77561)



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 Q77561

SUMMARY

Page 300 of the Microsoft FORTRAN Reference Manual says that the $LARGE metacommand specified without array names is identical to compiling the source module with the /AH compiler option.

The $LARGE metacommand is not equivalent to the /AH compiler option. the $LARGE metacommand will specify the HUGE attribute on all declared arrays. The /AH compiler option will assume that only array formal arguments will be given the HUGE attribute, and only then the array will be assumed to exceed 64K.

This is not an issue with FORTRAN PowerStation, because these attributes are not supported

MORE INFORMATION

The following code will produce the warning "F4330: I: NEAR/FAR/HUGE equivalence attribute conflict," illustrating that the $LARGE metacommand is treating the local array 'I' as HUGE. Removing $LARGE and compiling with /AH removes this error message.

Sample code

$LARGE
      integer i(2),j
      equivalence (i(1),j)
      end
				

Modification Type:MajorLast Reviewed:12/1/2003
Keywords:KB77561