View previous topic :: View next topic |
Author |
Message |
kingkastle
Joined: 22 May 2008 Posts: 20
|
Posted: Wed Nov 05, 2008 10:55 am Post subject: FORTRAN 77 vrs PLATO 3 |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7932 Location: Salford, UK
|
Posted: Wed Nov 05, 2008 3:05 pm Post subject: |
|
|
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). |
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Thu Nov 06, 2008 1:09 pm Post subject: |
|
|
That error looks as though you are doing :
Code: |
a=subfred(2.0d0)
.
.
subroutine subfred(value)
end
|
instead of:
Code: |
a=funcfred(2.0d0)
.
.
.
function funcfred(value)
funcfred=value**2
end
|
Regards
Ian |
|
Back to top |
|
|
|