The information in this article applies to:
SYMPTOMSWhen compiled with Microsoft FORTRAN version 5.0 or 5.1 under MS-DOS or OS/2, the sample program given on page 132 of the "Microsoft FORTRAN Advanced Topics" version 5.0 manual and page 105 of the "Microsoft FORTRAN Advanced Topics" version 5.1 manual generates the following error:
CAUSEThe version 5.1 FORTRAN "Reference Manual" states: An EQUIVALENCE statement cannot share memory between two different common blocks or between elements of the same common block.The error F2318 is generated in this case because the sample code attempts to EQUIVALENCE the arrays A and B that belong to two different COMMON blocks. RESOLUTIONTo avoid this error, compile the code after removing either A or B or both the arrays from COMMON blocks. MORE INFORMATIONThe following code, which is incorrect, is from the "Microsoft FORTRAN Advanced Topics" manual:
The following code illustrates the correct usage of EQUIVALENCE statement
and common blocks:
Additional query words: 5.00 nofps 5.10
Keywords : |
Last Reviewed: November 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |