In Fortran, is it possible to put a function in a common block as in: COMMON /myblock/ func (where x is some variable and func is a function).
My problem is that I would like to create a function s(x) that calls an external function func(x) but without passing func in s(x). For my project, s(x) has to be a function of only one variable, i.e., I do not want to do: function s(x,func) s=func(x)
Instead, I am hoping I could do: function s(x) common /myblock/ func s=func(x)
Or, if someone has some other suggestion using modules or something, this will be great.
Thanks in advance for any help.
o.
and then have the same common (myblock) in the subroutine that calls s(x).