forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FORTRAN 77 vrs PLATO 3

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato
View previous topic :: View next topic  
Author Message
kingkastle



Joined: 22 May 2008
Posts: 20

PostPosted: Wed Nov 05, 2008 10:55 am    Post subject: FORTRAN 77 vrs PLATO 3 Reply with quote

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
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7923
Location: Salford, UK

PostPosted: Wed Nov 05, 2008 3:05 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Thu Nov 06, 2008 1:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Plato All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group