Microsoft KB Archive/59231

= FIX: F6099: INTEGER Overflow Error with CHAR Function =

Article ID: 59231

Article Last Modified on 12/1/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.1
 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.1

-



This article was previously published under Q59231



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 &quot;ic - 68&quot;, 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: kbfix KB59231

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.