Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/104896

From BetaArchive Wiki
Knowledge Base

Article ID: 104896

Article Last Modified on 10/17/2003


  • Microsoft FORTRAN PowerStation 1.0 Standard Edition
  • Microsoft Fortran PowerStation 1.0a for MS-DOS
  • Microsoft FORTRAN PowerStation 32

This article was previously published under Q104896


For any integer data type, reading the smallest negative integer of that range generates the run-time error F6100 indicating that there was an INTEGER overflow on input.


Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft FORTRAN PowerStation 32, version 4.0.


The smallest negative integer for each integer data type is:

-128 Integer*1
-32768 Integer*2
-2147483648 Integer*4

The sample code below generates the 6100 error for all integer types when compiled with PowerStation, but only generates the 6100 error for integer*4 with FORTRAN 5.1 and earlier.

Sample Code

C No Compiler options needed
      integer*1 i
      integer*2 j
      integer*4 k
      do 10 n=3,5
        write(1,*) -2**((2**n-1))
 10   continue

      read(1,*,iostat=ierr) i
      if(ierr.eq.6100) then
        print*, 'error reading integer*1 was: ',ierr
        print*, 'integer*1 input: ',i
      end if

      read(1,*,iostat=ierr) j
      if(ierr.eq.6100) then
        print*, 'error reading integer*2 was: ',ierr
        print*, 'integer*2 input: ',j
      end if

      read(1,*,iostat=ierr) k
      if(ierr.eq.6100) then
        print*, 'error reading integer*4 was: ',ierr
        print*, 'integer*4 input: ',k
      end if


Additional query words: 1.00 5.10

Keywords: kberrmsg kbbug kbfix kblangfortran KB104896