FIX: F2352 Missing, Array Name as Statement Function Argument (23412)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 5.1
- Microsoft FORTRAN compiler for OS/2 5.1
This article was previously published under Q23412 SYMPTOMS
In Microsoft FORTRAN versions prior to version 5.1, an attempt to compile
an application that uses an array as a dummy argument in a statement
function fails and the compiler generates the following message:
error F2352: formal argument not local variable
However, this message does not appear when FORTRAN version 5.1 compiles
the application.
CAUSE
The error message is correct; the program is syntactically incorrect.
According to page 15-4 of the ANSI X3.9-1978 FORTRAN specification, an
application can reuse the names of the dummy arguments in a statement
function as a variable name or as a COMMON block name, but not as an
array name (see lines 39-44).
Microsoft FORTRAN version 5.1 does not generate the F2352 error message
under these conditions, even when compiler command line specifies the
-4Ys compiler option switch or the code contains the $STRICT
metacommand.
STATUS
Microsoft has confirmed this to be a problem in FORTRAN version 5.1 for
MS-DOS and OS/2. This problem was corrected in FORTRAN PowerStation version
1.0.
Modification Type: | Major | Last Reviewed: | 10/23/2003 |
---|
Keywords: | kbfix KB23412 |
---|
|