FIX: F2040 Error, * as Comment Character with /4Yi, /4Ys, /4Yv

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

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS and OS/2, version 5.0

SYMPTOMS

An attempt to compile an application fails and the compiler generates the following message:

      F2040: label on continuation line

CAUSE

The application contains one or more lines that place an asterisk (*) character in column one to indicate a comment and the compiler command line includes the /4Yi, /4Ys, or /4Yv compiler option switch.

RESOLUTION

To work around this problem, place the letter "C" into column one to indicate a comment.

STATUS

Microsoft has confirmed this to be a problem in FORTRAN version 5.0 for MS-DOS and OS/2. This problem was corrected in FORTRAN version 5.1 for MS-DOS and OS/2.

MORE INFORMATION

According to the ANSI FORTRAN 77 standard, an asterisk in column one indicates that a line contains a comment.

The definitions of the compiler option switches that generate this error are as follows:

   Switch     Description
   --------------------------------------------

   /4Yi       Enable SAA extensions
   /4Ys       Enable strict syntax checking
   /4Yv       Enable VAX FORTRAN extensions

The following code example demonstrates this problem.

Sample Code

C Compile option switches required to reproduce problem: C /4Yi, /4Ys, or /4Yv

      PROGRAM TEST
* This is a test
      END


Additional reference words: 5.00 F2037 buglist5.00 fixlist5.10
KBCategory: kbtool kbfixlist kbbuglist 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.