The information in this article applies to:
SYMPTOMSCompiling an application in OS/2 fails and a protection violation occurs. An attempt to compile the same application in MS-DOS fails and the compiler generates the appropriate message below. For FORTRAN version 5.1: For FORTRAN versions 4.1 and 5.0:
CAUSEThe application contains an executable statement that refers to a variable that is used later as a formal parameter in an ENTRY statement but not as a formal argument in a SUBROUTINE statement. FORTRAN does not support this practice. RESOLUTIONTo avoid this error, declare each variable used in an executable statement as a formal argument in a SUBROUTINE statement. STATUSMicrosoft has confirmed this to be a problem in FORTRAN versions 4.1, 5.0, and 5.1. This problem was corrected in FORTRAN PowerStation, version 1.0. MORE INFORMATIONFORTRAN does not support using a variable in an executable statement if it does not appear in a SUBROUTINE statement. The fourth paragraph on page 163 in the Microsoft FORTRAN "Reference" manual for versions 5.0 and 5.1 includes the following statement: A formal argument cannot appear in an executable statement that occurs before the ENTRY statement containing the formal argument unless the formal argument also appears in a FUNCTION, SUBROUTINE, or ENTRY statement that precedes the executable statement.The next-to-last paragraph on page 208 of the Microsoft FORTRAN "Language Reference" manual for version 4.1 contains similar information. FORTRAN PowerStation correctly generates the error: The following code example demonstrates this problem. Sample Code #1
If the application declares "B" as a formal parameter for the FRSTC
subroutine, the program compiles without any errors.
Sample Code #2
Additional query words: 4.10 5.00 5.10 buglist4.10 buglist5.00 buglist5.10 fixlist1.00
Keywords : |
Last Reviewed: November 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |