Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

error #6457 This derived type name has not been declared

$
0
0

Hi All,

I recently met a problem with error message "error #6457: This derived type name has not been declared.   [DRTYP]" in my code.

module derivetypetest
    implicit none
!DEC$ IF DEFINED (abc)
         type StringPointer
            character (len=1), pointer :: sp
         end type StringPointer
!
         type drtyp
            integer dim, size
            integer (kind=IntKind), pointer :: array(:,:)
         end type drtyp
!DEC$ ELSEIF DEFINED (def)
         type drtyp
            integer size
            integer (kind=IntKind), pointer :: array(:)
         end type drtyp
!
         character (len=1), private, allocatable :: whatever(:)
!DEC$ ENDIF
         private :: drtyp
         type(drtyp), private:: drtyparr(5)


end module derivetypetest

 

A workarround I used is that I put

         private :: drtyp
         type(drtyp), private:: drtyparr(5)

in !DEC$ IF and !DEC$ ELSEIF.

May I ask if there's other option to keep the codes in the original form?

 


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>