BUG: Incorrect Length Reported for Assumed-Size Arrays

ID: Q147764

4.00    | 4.00
WINDOWS | WINDOWS NT kbprg kbbuglist

The information in this article applies to:

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
Keywords          : kbFortranPS kbLangFortran kbbuglist
Version           : 4.00    | 4.00
Platform          : NT WINDOWS

Last Reviewed: March 3, 1996