DOCERR: Program-Name Not Optional in PROGRAM Statement

Last reviewed: February 29, 1996
Article ID: Q147748
The information in this article applies to:
  • Microsoft FORTRAN PowerStation for MS-DOS, versions 1.0 and 1.0a
  • Microsoft FORTRAN PowerStation 32 for Windows NT, version 1.0
  • Microsoft Fortran PowerStation for Windows 95 and Windows NT, version 4.0

SUMMARY

The Microsoft Fortran PowerStation version 4.0 reference manual and Help file incorrectly state that the program-name is optional when using the the PROGRAM statement. Actually, it is not optional. Compiling a source file using the PROGRAM statement without a program-name will cause one of the following syntax errors to occur:

For Fortran PowerStation versions 1.0 and 1.0a for MS-DOS and Fortran PowerStation version 1.0 for Windows NT, the error is:

   error F2115: syntax error

For Fortran PowerStation version 4.0 with the .for file extension, the errors are:

   error FOR2934: lexical error: Unrecognized statement
   error FOR3852: syntax error

For Fortran PowerStation version 4.0 with the .f90 file extension, the error is:

   error FOR3852: syntax error

MORE INFORMATION

According to the FORTRAN standard, the PROGRAM statement is optional, but if it is used, a program-name is required.

Sample Code to Illustrate Problem

C Compile options needed: none

      PROGRAM
      PRINT *, 'Hello!, World'
      END


Additional reference words: 1.00 1.00a 4.00
KBCategory: kbprg kbdocerr
KBSubcategory: FORTLngIss


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: February 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.