I will appreciate if someone could point out if it is my mistake or comelier issue
I have defined type point and overwritten default constructor.In the main program class point is available while I can not use it to define new types.
Here is an example
module point_class
implicit none
private
public :: point
type point
real :: x
real :: y
end type
interface point
module procedure constructor1
end interface
contains
function constructor1(x,y)
real, intent(in) :: x
real, intent(in) :: y
type(point) :: constructor1
constructor1%x = x
constructor1%y = y
end function
end module point_class
program example
use point_class
class(point), pointer :: p1 ! recognized
type particle
!type(point) :: coordinates ! works
type(point), pointer :: coordinates ! errorpoint is not a derived type name.
!class(point), pointer :: coordinates ! error point is not a derived type name.
end type particle
end program example
Thanks
連結已複製
5 回應
We do not have a single list of all known issues. Sometimes we create "known issue" knowledge base articles, but there isn't for this one.
In any event, this wasn't a known issue until you reported it.
In any event, this wasn't a known issue until you reported it.
