- #1
NicolasPan
- 21
- 2
Hello everyone! I've been wondering if it is possible in Fortran to 'read' a function.For instance when I code this:
It would be ideal if the program allowed the user to type the function each time, rather than having it pre-set by the programmer.Thanks in advance!
Fortran:
contains
function f(x)
double precision :: f
double precision ::x
f=(whatever the function)
return
end function
end program