Silverfrost Forums

Welcome to our forums

FORTRAN 77 vrs PLATO 3

5 Nov 2008 9:55 #3949

Hi,

I´m trying to run some codes developed with F77 in my new Plato3, I find an error that I don´t know how to handle:

'Attempt to call a subroutine as if it were a real(kind=1) function'

I check and I make sure that all imputs are the same real with same kind, I think the problem is not that point, but what make me think is the following: In the F77 program there is parameters like this 2.0d, I understand that are real double precision, but does Plato 3 support this way? shall type 2. instead?

Thanks very much in advance, any help is apreciated Best regards

5 Nov 2008 2:05 #3955

Plato calls the FTN95 Fortran compiler and this supports Fortran 77 which is a subset of Fortran 95. A double precision value of 2.0 can be written as 2.0D0 (Fortran 77) or 2.0_k (where k is the kind value for double precision in a Fortran 95 program).

6 Nov 2008 12:09 #3971

That error looks as though you are doing :

a=subfred(2.0d0)
.
.

subroutine subfred(value)

end

instead of:

a=funcfred(2.0d0)
.
.
.
function funcfred(value)

funcfred=value**2

end

Regards

Ian

Please login to reply.