Prob:compiling a Lahey fortran 95 code with CVF6

Prob:compiling a Lahey fortran 95 code with CVF6

hi,
I am a phd researcher in a university of Patras GREECE.I got a Fortran code ( .f90 ) written with Lahey fortran 95.I am using Digital VF6.When I compile I get always this error:

G:science............. .F90(64832) : Error: This name does not have a type, and must have an explicit type. [POINTER]
locfcn = POINTER( ia(1) )
the function where this error exist is

!+
integer function locfcn(ia)
! ----------------------------------------------------------------------
IMPLICIT NONE
INTEGER ia(*)
locfcn = POINTER( ia(1) )
return
! ==========================================
END Function Locfcn

!+

When I compile with the trial compiler of lahey fortran 95 {lf95 -nf95 -nchk *******.f90} everything is ok.But I can't work with the trial version.

I would appreciate if anyone can help me

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Use LOC() instead of POINTER() in CVF, if I understand what Lahey's POINTER does.

Steve

Steve

Steve is, naturally, right.
Pointer function (note that there is also Pointer statement in LF95) gets address of a variable, array reference or external subprogram. (go to that page for details) Pointer in Compaq Fortran takes two arguments (details in CVF Help system). As far as I know there is some differences/incompatibilities for POINTER function between versions of LF90 and LF95 (cannot take literal constant arguments, only variables or something similar)

As a last resort you can go to that page and check your code conformance with the F90/95 standard.

Artur

A nit - the Compaq Fortran extension POINTER (A,B) is a statement (a declaration), not a function. It is an entirely different beast than Lahey's POINTER.

Steve

Steve

Steve,
I admit, I mixed things with Compaq statement (I do hope that you're not using British English:-))

Artur

Login to leave a comment.