FIX: F6099: INTEGER Overflow Error with CHAR Function

Last reviewed: September 11, 1997
Article ID: Q59231
5.00 5.10 | 5.00 5.10
MS-DOS    | OS/2
kbtool kbfixlist kbbuglist kberrmsg

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS, versions 5.0 and 5.1
  • Microsoft FORTRAN for OS/2, versions 5.0 and 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 reference words: 5.00 5.10
KBCategory: kbtool kbfixlist kbbuglist kberrmsg
KBSubcategory: FLIss
Solution Type : kbfix


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.

Last reviewed: September 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.