Microsoft KB Archive/106727: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 88: Line 88:
== MORE INFORMATION ==
== MORE INFORMATION ==


The Microsoft FORTRAN PowerStation &quot;Language Guide&quot; states that arrays in an array expression must &quot;conform&quot;, 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.<br />
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.<br />
<br />
<br />
NOTE: If the array is declared as adjustable, an appropriate error message is generated:
NOTE: If the array is declared as adjustable, an appropriate error message is generated:

Latest revision as of 10:11, 20 July 2020

Article ID: 106727

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
  • 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

SYMPTOMS

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

RESOLUTION

Do not use assumed size arrays in an array expression.

STATUS

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.

MORE INFORMATION

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 FUNCTION SP(s,n)
      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)
      END

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


Additional query words: 1.00 4.00 5.00 5.10

Keywords: kberrmsg kblangfortran KB106727