Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Fortran > Problems in pas...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 17 Topic 8147 of 8471
Post > Topic >>

Problems in passing a function to a subroutine

by deltaquattro <deltaquattro@[EMAIL PROTECTED] > Apr 17, 2008 at 03:00 AM

Hi,

I have a numerical integration subroutine quad and I want to use it to
perform an complex integral in my code. quad has an interface for a
function which depends only on x:

quad(func,a,b)
...
interface
  real function func(x)
  real :: x
  end func
end interface
...
end quad

However, the function to be integrated depends on many parameters, not
only on x. How can I pass it to quad? Is it better to modify the
interface in quad (and all the subroutines called by quad), or to
create a module containing func and all the modules needed by it? Have
you ever met a similar problem? Thanks

best regards

deltaquattro
 




 17 Posts in Topic:
Problems in passing a function to a subroutine
deltaquattro <deltaqua  2008-04-17 03:00:56 
Re: Problems in passing a function to a subroutine
Arjen Markus <arjen.ma  2008-04-17 04:26:52 
Re: Problems in passing a function to a subroutine
deltaquattro <deltaqua  2008-04-17 04:55:53 
Re: Problems in passing a function to a subroutine
Arjen Markus <arjen.ma  2008-04-17 05:12:26 
Re: Problems in passing a function to a subroutine
Ron Shepard <ron-shepa  2008-04-17 11:53:52 
Re: Problems in passing a function to a subroutine
glen herrmannsfeldt <g  2008-04-17 10:31:11 
Re: Problems in passing a function to a subroutine
nospam@[EMAIL PROTECTED]   2008-04-17 12:07:48 
Re: Problems in passing a function to a subroutine
nospam@[EMAIL PROTECTED]   2008-04-17 12:31:54 
Re: Problems in passing a function to a subroutine
glen herrmannsfeldt <g  2008-04-17 12:02:53 
Re: Problems in passing a function to a subroutine
"jamesgiles@[EMAIL P  2008-04-17 12:50:54 
Re: Problems in passing a function to a subroutine
deltaquattro <deltaqua  2008-04-18 05:08:42 
Re: Problems in passing a function to a subroutine
nospam@[EMAIL PROTECTED]   2008-04-18 08:26:29 
Re: Problems in passing a function to a subroutine
deltaquattro <deltaqua  2008-04-18 07:01:08 
Re: Problems in passing a function to a subroutine
pa@[EMAIL PROTECTED] (Pi  2008-04-19 13:45:06 
Re: Problems in passing a function to a subroutine
Charles Coldwell <cold  2008-04-18 14:03:31 
Re: Problems in passing a function to a subroutine
nospam@[EMAIL PROTECTED]   2008-04-18 08:41:23 
Re: Problems in passing a function to a subroutine
glen herrmannsfeldt <g  2008-04-18 08:15:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 6:13:03 CDT 2008.