BUG: FOR3294 Error Using Module Inside Module ProcedureLast reviewed: April 12, 1996Article ID: Q149751 |
The information in this article applies to:
SYMPTOMSReferencing a user-defined data type, defined in one module, at another module's internal procedure level causes the compiler to fail to recognize the user-defined data type. Specifically, this occurs when the module and main program sources are contained in different files. The following compiler error is generated under these circumstances:
error FOR3294: derived type referenced but not declared RESOLUTIONDo one of the following:
STATUSMicrosoft 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
Steps to Reproduce Problem
Sample Code to Illustrate Problem and Workaround! Compile options needed: none ! --- mods.for ---
module types type my_type real :: x end type my_type end module types module funcs ! use types ! uncomment this line for first workaround contains function my_func(z1) result(z2) use types ! comment this line for first workaround implicit none real z1 type(my_type) z2 z2 % x = z1 end function my_func end module funcs! --- prog.for ---
program test use types use funcs implicit none real a type (my_type) :: b a = 1.0 b = my_func(a) end program test |
Additional reference words: 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |