BUG: Array Expression with Assumed Size ArraysLast reviewed: December 10, 1995Article ID: Q106727 |
The information in this article applies to:
SYMPTOMSThe 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 informationFor Fortran PowerStation 4.0 the error message given for referenced assumed-size arrays is:
error FOR2305: invalid appearance of assumed-size array name S RESOLUTIONDo not use assumed size arrays in an array expression.
STATUSMicrosoft 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 INFORMATIONThe 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 arrayNOTE: 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 CodeCompile 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 reference words: 1.00 4.00 5.00 5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |