The information in this article applies to:
SYMPTOMSAn application generates incorrect results. When FORTRAN for MS-DOS versions 4.0, 4.0a, or 4.01 compiles the program, the compiler generates the following message:
CAUSEThe problem occurs because the compiler requires the return value of an entry to be set using the entry name. The ANSI FORTRAN-77 standard states that the return value can be set using the entry name or the original function name if they have the same type. RESOLUTIONTo work around this problem, set the return value of a entry that is part of a function by using the entry name instead of the function name. STATUSMicrosoft has confirmed this to be a problem in FORTRAN versions 4.0, 4.0a, 4.01, 4.10, and 5.00 for MS-DOS and versions 4.1 and 5.0 for OS/2. This problem was corrected in FORTRAN version 5.10 for MS-DOS and OS/2. MORE INFORMATIONPages 15-12 and 15-13 of the ANSI FORTRAN-77 standard include the following statement. 15.7.3 Entry Association. Within a function subprogram, all variables whose names are also the names of entries are associated with each other and with the variable, if any, whose name is also the name of the function subprogram (17.1.3). Therefore, any such variable that becomes defined causes all associated variables of the same type to become defined and all associated variables of different type to become undefined.Therefore, it should be possible to set the return value of an entry that belongs to a function through the function name or the entry name if both have the same type. The following code example demonstrates this problem. Sample Code #1
The following code example demonstrates one method to avoid this problem.
Sample Code #2
Additional query words: 4.00 4.00a 4.01 4.10 5.00 buglist4.00 buglist4.00a buglist4.01 buglist4.10 buglist5.00 fixlist5.10
Keywords : |
Last Reviewed: November 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |