PRB: Error 2201 w/ $DEBUG, Invalid Long Integer Overflow Error
PSS ID Number: Q10644
Article last modified on 02-09-1993

3.20

MS-DOS


----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft FORTRAN for MS-DOS, version 3.2
----------------------------------------------------------------------

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

      ? Error: long integer math overflow
        Error Code 2201

CAUSE
   The application uses the $DEBUG metacommand and contains an
   assignment to an INTEGER*4 variable that could cause an INTEGER*2
   variable to overflow. The compiler generates the debug information
   incorrectly and causes the error.

RESOLUTION
   Modify the source code to avoid using the $DEBUG metacommand in an
   application that uses INTEGER*4 variables.

STATUS
   Microsoft has confirmed this to be a problem in FORTRAN version 3.2
   for MS-DOS. This problem was corrected in FORTRAN version 3.3 for
   MS-DOS.

More Information:

The following code example demonstrates this problem.

Sample Code
-----------

$DEBUG
      PROGRAM TEST
      INTEGER*4 IX

      X = 327.64
      IX = 32780

      DO 10 J = 1, 10
        IX = (X * 100)
        WRITE(*, *) IX, X
10    X = X + .01
      END

Additional reference words: 3.20

=============================================================================

Copyright Microsoft Corporation 1993.
