FUNCTION attribute conflicts with SUBROUTINE attribute

  • Fortran
  • Thread starter Vrbic
  • Start date
  • #1
381
11
Hello, I'm trying to use Runge Kutta with adaptive stepsize from numerical recipes(page 742, https://websites.pmc.ucsc.edu/~fnimmo/eart290c_17/NumericalRecipesinF77.pdf ). I rewrote code but I have got failure messages both in an attachment. If I cut this subroutine everything is fine also this failure are independent on a definition of function 'derivs' which is causing the problem in calling.
Thank you for any advice.
 

Attachments

Answers and Replies

  • #2
DrClaude
Mentor
7,388
3,648
Your first image is too small to read. Looking at the second one, in rkck the declaration
Fortran:
double precision, external :: derivs
would be valid for a function, not a subroutine. it should be simply
Fortran:
external :: derivs
 
  • #3
381
11
Your first image is too small to read. Looking at the second one, in rkck the declaration
Fortran:
double precision, external :: derivs
would be valid for a function, not a subroutine. it should be simply
Fortran:
external :: derivs
Good to know,
Thank you!! SOLVED
 

Related Threads on FUNCTION attribute conflicts with SUBROUTINE attribute

Replies
5
Views
901
Replies
8
Views
762
Replies
4
Views
714
Replies
6
Views
6K
Replies
2
Views
2K
Replies
1
Views
1K
Replies
0
Views
2K
Replies
4
Views
9K
Replies
8
Views
2K
Top