BUG: Problems WATCHing Arguments Passed to ENTRY StatementLast reviewed: July 7, 1995Article ID: Q75014 |
The information in this article applies to:
SYMPTOMSPrograms compiled with Microsoft FORTRAN versions 4.0, 4.01, 4.1, 5.0, and 5.1 using the /Od and /Zi compiler options can give incorrect results when WATCHing an argument in CodeView under MS-DOS, or generate an I/O error when WATCHing an argument in CodeView under OS/2. These errors may occur if the program contains the following:
RESOLUTIONTo avoid this problem, pass the argument to the SUBROUTINE or external FUNCTION as well as to the ENTRY point.
STATUSMicrosoft has confirmed this to be a problem in FORTRAN versions 4.0, 4.01, 4.1, 5.0, and 5.1. We are researching the problem and will post new information here as it becomes available.
MORE INFORMATIONThe following sample program illustrates the problem:
real val call entersub(val) end subroutine sub real val entry entersub(val) val=val+1 end Placing a WATCH on the variable "val" shows that it is correctly initialized to zero in the main routine, but stepping into the subroutine the value of "val" is incorrect. The value of "val" is correctly displayed upon returning to the main routine. Placing a WATCH on the variable "val" shows that it is correctly initialized to zero in the main routine, but stepping into the subroutine the value of "val" contains an "I/O error." The value of "val" is correctly displayed upon returning to the main routine. Passing the argument to the SUBROUTINE or external FUNCTION as well as to the ENTRY point will prevent the problem from occurring. The following sample program illustrates the solution:
real val call entersub(val) end subroutine sub(val) real val entry entersub(val) val=val+1 end |
Additional reference words: 5.00 5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |