replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - error executing a program!
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 

error executing a program!

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



Joined: 22 Dec 2011
Posts: 8

PostPosted: Thu Jan 19, 2012 1:44 pm    Post subject: error executing a program! Reply with quote

implicit none
integer :: i, f, Factorial
print*, 'type in the number, integer only'
read*, i
do while(i<0)
print*, 'factorial only defined for positive integers: Re-input'
read*, i
enddo
f=Factorial(i)
print*, 'answer is', f

end

error!

WARNING the following symbols are missing:
FACTORIAL C:\project2\lgotemp@.obj
(C:\PROJECT2\FUNCTION2.F95)
Creating executable: C:\project2\function2.EXE


pls help, can't figure out the problem.
thanks
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Jan 19, 2012 7:06 pm    Post subject: Reply with quote

Factorial is not known to the compiler and it assumes that it is an external function. You can supply Fortran code to define Factorial.

After your end statement you need something like

integer function Factorial(i)
integer i
! Some code to calculate the result
Factorial = result
end
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support 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