FIX: F6099: INTEGER Overflow Error with CHAR Function

ID: Q59231


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 5.0, 5.1
  • Microsoft FORTRAN for OS/2, versions 5.0, 5.1


SYMPTOMS

The

F6099 run-time error - INTEGER overflow
may not be generated correctly when the /4Yb switch is used at compile time on code that contains a write statement and the CHAR intrinsic function, in that order.


RESOLUTION

If the write statement is commented out, or if 76 is substituted for the expression "ic - 68", no error is produced.

If the integer variable, ic, is initialized to a value of 127 or less, the error does not occur. Also, if the character variable, jcha, is typed as character*2 or greater, the error does not occur. Finally, the numeral 68 in the char function can be replaced with any integer greater than 0 and it will still generate the F6099 error at run time.


STATUS

Microsoft has confirmed this to be a problem in FORTRAN versions 5.0 and 5.1. This problem was corrected in FORTRAN PowerStation.


MORE INFORMATION

The code below produces the F6099 run-time error when compiled with the /4Yb switch (extended error handling).


      character*1 jcha
      ic = 134
      write (*,*) ic
      jcha = char(ic - 68)
      end 

Additional query words: 5.00 5.10

Keywords :
Version : :5.0,5.1
Platform :
Issue type :


Last Reviewed: November 1, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.