PRB: F2836: "statement out of order" with PARAMETER

Last reviewed: December 11, 1995
Article ID: Q49976
The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 4.0, 4.01, 4.1, 5.0, 5.1
  • Microsoft FORTRAN for OS/2, versions 4.1, 5.0, 5.1
  • Microsoft FORTRAN PowerStation for MS-DOS, versions 1.0 and 1.0a
  • Microsoft FORTRAN PowerStation 32 for Windows NT, version 1.0 and 4.0

SYMPTOMS

Compiling an application that contains the PARAMETER statement, but not the required parenthese causes the compiler to generate the following message:

   F2836: statement out of order

In addition, "error F4999: variable declared but not used" may be generated.

Or for Fortran PowerStation 32, version 4.0:

   warning FOR4265: symbol referenced but not set

RESOLUTION

To address this problem, modify the source code to place the parentheses on each PARAMETER statement.

MORE INFORMATION

When the compiler processes the following code example, it generates an F2836 error even though statement order is correct. This error is caused by parentheses missing from the PARAMETER statement and can be eliminated by adding the parentheses.

Sample Code

C Compile options needed: None

      INTEGER*2 N
      PARAMETER N = 1
      INTEGER*2 M
      END


Additional reference words: 4.00 4.01 4.10 5.00 5.10 1.00 1.00a
KBCategory: kbtool kberrmsg kbprb
KBSubcategory: FLIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 11, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.