The information in this article applies to:
SYMPTOMS
Using the Microsoft FORTRAN compiler to compile a program that contains a
syntax error in a FORMAT statement can cause the compiler to halt the
machine under MS-DOS or to generate a protection violation under OS/2.
CAUSEThe specific syntax error is caused by a comma at the beginning of a FORMAT statement, followed by a character string constant that contains large integer numbers. The real problem is having a huge number in a FORMAT statement. The out-of-place comma causes the compiler to parse the format as if the first single quotation mark isn't there. Normally, the compiler will determine at the end of the parse that the comma shouldn't be there, and the compiler will issue an error. In this case, however, the machine halts before the error output. Blanks in numbers are ignored. Having a huge number in the format causes the same problem (sample code 2). Because extremely large numbers do not make sense in FORMAT statements, the expected source of the error is the comma, which causes the string to be parsed as a number. RESOLUTIONCorrecting the syntax error eliminates the problem. STATUSMicrosoft has confirmed this to be a bug in the products listed above. This problem was corrected in Microsoft FORTRAN PowerStation 32, version 4.0. MORE INFORMATIONThe following code can be used to reproduce the problem. Sample Code 1
Sample Code 2
This code illustrates the solution.
Sample Code 3
Additional query words: 1.00 5.00 5.10
Keywords : kberrmsg kbFortranPS kbLangFortran |
Last Reviewed: November 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |