FIX: LOC Fails on Double COMPLEX Structure Element

Last reviewed: September 18, 1997
Article ID: Q112341
1.00 1.00a | 1.00
MS-DOS     | WINDOWS NT
kbtool kbfixlist

The information in this article applies to:

  • Microsoft FORTRAN PowerStation for MS-DOS, version 1.0 and 1.0a
  • Microsoft FORTRAN PowerStation 32 for Windows NT, version 1.0

SYMPTOMS

Using the LOC intrinsic function to return the address of a COMPLEX*16 structure variable results in an address of 0 (zero).

RESOLUTION

Use the LOC function on a different type of field in the structure and then calculate the address of the DOUBLE PRECISION COMPLEX field. If necessary, create a UNION block to map a different variable type to the double COMPLEX element.

STATUS

Microsoft has confirmed this to be a problem in FORTRAN PowerStation for Windows NT, version 1.0 and for MS-DOS, versions 1.0 and 1.0a. This problem was corrected in FORTRAN PowerStation 32, version 4.0.

MORE INFORMATION

The following sample illustrates the problem:

Sample Code

c Compile options needed: none c

      structure /nest/
        double complex tests
      end structure

      record /nest/ t
      t.tests=(0.,0.)
      i = loc(t.tests)
      print10, 'loc(t.tests)          ', i,i
10 format(1x,a,i8,3x,z)
      end


Additional reference words: 1.00 1.00a
KBCategory: kbtool kbbuglist kbfixlist
KBSubcategory: FORTLngIss
Keywords : FORTLngIss kbbuglist kbfixlist kbtool
Version : 1.00 1.00a | 1.00
Platform : MS-DOS NT WINDOWS
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 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.