Microsoft KB Archive/73202

= FIX: Incorrect Error on Allocatable Array with Map in Name =

Article ID: 73202

Article Last Modified on 10/23/2003

-

APPLIES TO


 * Microsoft FORTRAN Compiler 5.0
 * Microsoft FORTRAN Compiler 5.0

-



This article was previously published under Q73202



SYMPTOMS
If a program contains an allocatable array with the word &quot;map&quot; as the first part of the array name, the following error may be incorrectly generated on the ALLOCATE statement for that array when compiling with Microsoft FORTRAN version 5.0:

error F2115: syntax error

The ALLOCATE statement must allocate at least two arrays, and the array containing &quot;map&quot; as the first part of its name must follow another array in the ALLOCATE statement.



RESOLUTION
The solution to this problem is to avoid the word &quot;map&quot; in the name of an allocatable array, or to upgrade to FORTRAN version 5.1.



STATUS
Microsoft has confirmed this to be a problem in FORTRAN version 5.0. This problem was corrected in FORTRAN version 5.1.



MORE INFORMATION
The following code will cause the incorrect syntax error:

Sample code
integer*4 map[allocatable] integer*4 j[allocatable] allocate ( j(1), map(1) )     ! syntax error generated here end Renaming the array will avoid this error. The following program illustrates this solution: integer*4 amap[allocatable] integer*4 j[allocatable] allocate ( j(1), amap(1) ) end

Additional query words: 5.00 buglist5.10 fixlist5.10

Keywords: kbfix KB73202

-

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

© Microsoft Corporation. All rights reserved.