Microsoft KB Archive/106727

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 10:11, 20 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Article ID: 106727

Article Last Modified on 12/1/2003


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

This article was previously published under Q106727


The compiler does not generate an error message when assumed size arrays and scalars are used in an array expression. The array expression does not perform any action.

In FORTRAN PowerStation 32, version 1.0, compiling the sample code below generates:

Command line error D2030 : INTERNAL COMPILER ERROR in 'C:\LANG\FPSNT\BIN\f13232.exe'
Please see the Microsoft Support Services section in the manual for more information

For Fortran PowerStation 4.0 the error message given for referenced assumed-size arrays is:

error FOR2305: invalid appearance of assumed-size array name S


Do not use assumed size arrays in an array expression.


Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


The Microsoft FORTRAN PowerStation "Language Guide" states that arrays in an array expression must "conform", and that one of the requirements for conforming is that the dimensions of the array be known at compile time. The dimensions are not known at compile time for assumed size arrays. Therefore, they are not conforming and must not be used in array expressions.

NOTE: If the array is declared as adjustable, an appropriate error message is generated:

error F2650: S : array expression : cannot be adjustable-size array

NOTE: If the array expression contains both a fully specified array and assumed size array, the correct error message is generated:

error F2651: S : array expression : argument does not conform

Sample Code

Compile options: none

      INTEGER*4 n, s(*)
c      INTEGER*4 n, s(n) !Adjustable size declaration
c      INTEGER*4 t(2)    !Fully specified array
      s = n
c      t = s             !Fully specified array and assumed size array
      SP = s(1)

      integer sp, s(2)
      n = 2
      s = 1
      i = SP(s,n)
      print *, i, s

Additional query words: 1.00 4.00 5.00 5.10

Keywords: kberrmsg kblangfortran KB106727