Incorrect Expression Evaluation

Product Version(s): 3.31
Operating System:   MS-DOS
Flags: ENDUSER |
Last Modified: 12-MAY-1988    ArticleIdent: Q11347

Problem:
   The expression '(I - 1) * 256' is not being evaluated correctly.
   When $STORAGE:2 and $DEBUG metacommands are used and I is given the
value 128, an integer overflow error occurs.
   The following code example demonstrates this behavior:

      $STORAGE:2
      $DEBUG
      PROGRAM TEST
      I = 128
      J = (I - 1) * 256
      END

Response:
   Microsoft confirmed this to be a problem in Version 3.31 of the
FORTRAN compiler.
   This problem was corrected in Version 4.00.