- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys,
I am newly coming, and feel sorry for what I gonging to asking for, because this question may not belong to this forum. But I don't know where to ask for help.
I am using Ubuntu14.0/g++/g77 to make my project. Part of my old code as fallow:
!-------------------------------------------------------------------------------
pointer (p_FX1, buf_FX1), (p_FY1, buf_FY1), (p_FX2, buf_FX2)
pointer (p_FY2, buf_FY2)
pointer (p_image3, buf_image3)
pointer (p_image5, buf_image5)
pointer (p_PreOrg, buf_PreOrg)
pointer (p_SubOrg, buf_SubOrg)
real*4 buf_FX1, buf_FY1
real*4 buf_FX2, buf_FY2
integer*2 buf_image3
integer*2 buf_image5
integer*2 buf_PreOrg
integer*2 buf_SubOrg
...
p_PreOrg = malloc( ncol*nlin*2 )
p_SubOrg = malloc( ncol*nlin*2 )
call copy_image(image1, buf_PreOrg, ncol, nlin)
....
!--------------------------------------------------------------------------------
error as follow:
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pointer (p_FY2, buf_FY2)
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pointer (p_image3, buf_image3)
1 2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
pointer (p_image5, buf_image5)
How can fix this?
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Declarations of the type pointer (p_FY2, buf_FY2) relate to what are often called Cray Pointers, which were supported in some Fortran compilers but were not part of the standard language. Furthermore, g77 is obsolete. Use gFortran instead, which would have told you
crayp.f:2:15: pointer (p_FY2, buf_FY2) 1 Error: Cray pointer declaration at (1) requires -fcray-pointer flag
Your post is unrelated to Intel Fortran, and you should try comp.lang.fortran and other forums with gFortran questions.

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