- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace the non-standard component separator '.' by '%'. It seems that the compiler does not recognize the period as equivalent to the % sign in all contexts.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace the non-standard component separator '.' by '%'. It seems that the compiler does not recognize the period as equivalent to the % sign in all contexts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you start using % you have to keep using %. Mixing them is not nice. But you should use % always and drop the dot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanx very very much. It worked :)

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page