Can You Use Nested Subroutines in Fortran95 and How Do You Link Them?

  • Topic: Fortran 
  • Thread starter Thread starter dichotomy
  • Start date Start date
  • Tags Tags
    Fortran Program
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 7K views
dichotomy
Messages
24
Reaction score
0
basic question really...can you have subroutines nested within subroutines? or are there any other types of subprograms within fortran95 other than functions and subroutines? (need one that can pass back an array)

if you can [use subs within subs], how do you link them? like in the main program you have to use an INTERFACE-END INTERFACE construction to link to the subroutine...

ta in advance
 
Physics news on Phys.org
erm...could you elaborate? I'm writing a program that solves linear equations with gauss seidel iteration (and gauss/gauss jordan elimination), so there's a main program which calls the various methods as subroutines...

except within the gauss seidel subroutine I want to separate a bit which makes the matrix diagonally dominant(ish)...obviously after rearranging the rows the matrix needs to be passed back to the gauss seidel subroutine.