A value stored in a structure pointed by a pointer is unable to be passed on in another variable
temp_crowding_dist = pop%ind(1).crowd_dist
Following error is showing while building the project
Error 1 error #5082: Syntax error, found '.' when expecting one of: * ) :: , <END-OF-STATEMENT> ; . % (/ + - : ] /) ' ** / // > .LT. ... D:\Crowding_dist\Fortran_code\F_NSGA_II\Crowding_Distence_ref_2\Crowding_Distence_ref_2\crowddist.f90 177
If I comment this line and check the value of pop%ind(1).crowd_dist in watch window by running upto that line, it is showing the correct value
PS:
TYPE population
TYPE (individual), DIMENSION(:) , POINTER :: ind
END TYPE
TYPE individual
INTEGER, POINTER :: rank
DOUBLE PRECISION, POINTER :: constr_violation
DOUBLE PRECISION, POINTER :: crowd_dist
DOUBLE PRECISION, DIMENSION(:), POINTER :: obj
DOUBLE PRECISION, DIMENSION(:), POINTER :: constr
TYPE (gene_bit), DIMENSION(:), POINTER :: gene
DOUBLE PRECISION, DIMENSION(:), POINTER :: xbin
DOUBLE PRECISION, DIMENSION(:), Pointer :: xreal
END TYPE