FIX: F2836: Statement Out of Order Error From ENTRY Statement

Last reviewed: September 11, 1997
Article ID: Q69188
4.00 4.01 4.10 5.00 | 4.10 5.00
MS-DOS              | OS/2
kbtool kbbuglist kberrmsg kbfixlist

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS, versions 4.0, 4.01, 4.1, 5.0
  • Microsoft FORTRAN for OS/2, versions 4.1, 5.0

SYMPTOMS

Compiling an application that has an ENTRY statement that precedes a specification statement, type statement, implicit statement, or a parameter statement causes the compiler to generate one of the following error:

   F2836: Statement Out of Order

If the ENTRY statement precedes a statement function statement, the error generated is:

   F2515: left side of assignment illegal

If the ENTRY statement precedes the $LARGE or $NOTLARGE metacommand, the errors generated are:

   F2021: $LARGE illegal in executable statements
   F2021: $NOTLARGE illegal in executable statements

RESOLUTION

To work around this problem, modify the source code to place the ENTRY statement after specification statements, type statements, implicit statements, parameter statements, statement function statements, and the $LARGE and $NOTLARGE metacommands.

STATUS

Microsoft has confirmed this to be a problem in FORTRAN versions 4.0, 4.01, 4.1, and 5.0. This problem was corrected in FORTRAN version 5.1.

MORE INFORMATION

The ENTRY statement, which is described on pages 162-163 of the Microsoft FORTRAN "Reference" manual for versions 5.0 and 5.1, specifies an alternate entry point for a subroutine or an external function.

According to the Order of Statements chart (Figure 2.1) on page 47 of the "Reference" manual, the ENTRY statement can appear before or after any statement in a BLOCK DATA, FUNCTION, PROGRAM, or SUBROUTINE block.

The following code example, which uses the ENTRY statement and a type statement, demonstrates this problem.

Sample Code

C Compile options needed: None

      CALL IN
      END

      SUBROUTINE SUB
      ENTRY IN
      INTEGER A
      END


Additional reference words: 4.00 4.01 4.10 5.00 buglist4.00 buglist4.01
buglist4.10 buglist5.00 fixlist5.10
KBCategory: kbtool kbbuglist kbfixlist kberrmsg
KBSubcategory: FLIss
Solution Type : kbfix


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: September 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.