FIX: Incorrect Error on Allocatable Array with Map in Name

Last reviewed: September 11, 1997
Article ID: Q73202
5.00 | 5.00 MS-DOS | OS/2 kbtool kbbuglist kbfixlist

The information in this article applies to:

  • Microsoft FORTRAN for MS-DOS, version 5.0
  • Microsoft FORTRAN for OS/2, version 5.0

SYMPTOMS

If a program contains an allocatable array with the word "map" 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 "map" 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 "map" 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 reference words: 5.00 buglist5.10 fixlist5.10
KBCategory: kbtool kbbuglist kbfixlist
KBSubcategory: FLIss
Solution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.