DOCUMENT:Q109876 03-NOV-1999 [fortran] TITLE :BUG: In-line Comment in Continued FORMAT Causes Syntax Error PRODUCT :Microsoft Fortran Compiler PROD/VER::1.0,4.0 OPER/SYS: KEYWORDS:kbCompiler kbFL32 kbFortranPSkbbuglist ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Fortran Powerstation 32 for Windows NT, versions 1.0, 4.0 ------------------------------------------------------------------------------- SYMPTOMS ======== An attempt to compile a program containing a FORMAT specifier that is more than one line long and that has an in-line comment on a line other than the last, causes the following warning: warning F4989: ' ' : unexpected character in format In-line comments start with an exclamation point. If the FORMAT statement is referenced during program execution, it will cause the program to terminate with exit code 1. The following run-time error might be generated: run-time error F6989: WRITE ' %c ' : unexpected character in format RESOLUTION ========== This problem can be corrected by removing the embedded comment. STATUS ====== Microsoft has confirmed this to be a problem in the products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. Sample Code ----------- c Compile options needed: have no effect c The following program reproduces the problem: 10 format('This shows that an embedded ', ! Here is the comment & 'comment causes a problem.') write(*,10) end Additional query words: 1.00 4.00 ====================================================================== Keywords : kbCompiler kbFL32 kbFortranPS kbbuglist Technology : kbAudDeveloper kbFortranSearch kbZNotKeyword2 kbFORTRANPower32100NT kbFORTRANPower32400NT Version : :1.0,4.0 ============================================================================= 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. Copyright Microsoft Corporation 1999.