BUG: Incorrect Length Reported for Assumed-Size Arrays

Last reviewed: February 29, 1996
Article ID: Q147764
The information in this article applies to:
  • Microsoft Fortran PowerStation for Windows 95 and Windows NT, version 4.0

SYMPTOMS

The properties page dialog incorrectly reports the wrong character length information for assumed-size character array elements in the debugger.

STATUS

Microsoft has confirmed this to be a bug 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

Using Developer Studio, build the following sample code. On the Build menu, click Debug, and then click Step Into to begin the debugging process. Step into the subroutine sub() and go to the return statement. In the locals window, expand the assumed-size array "i" by clicking the nesting symbol (+). Next, highlight the first array element, and bring up the properties page dialog by pressing ALT+ENTER, or click Properties on the Edit menu. The array element information in the type field is incorrrectly reported as CHARACTER(4) even though the assumed-size array element length is actually CHARACTER(10).

Sample Code

C Compile options needed: /Zi

      character(len=10),dimension(5)::h
      h = 'aaaaaaaaaa'
      call sub(h)
      end

      subroutine sub(i)
        character(len=*),dimension(*)::i
        i(1) = 'bbbbbbbbbb'
        return
      end subroutine


Additional reference words: 4.00
KBCategory: kbprg kbbuglist
KBSubcategory: FORTLngIss


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: February 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.