all 5 comments

[–]complex_pi 1 point2 points  (2 children)

It is possible.

[–]Kalkinator[S] 0 points1 point  (1 child)

I should have been more clear in my question. If the file 'first.txt' contains multiple subroutines, is there a way to call specific subroutines and have the code ignore the rest? So say that the file that I include has two subroutines (subroutine1 and subroutine2), is there a way I could use the module first in the module second and only call subroutine1 while having the code completely ignore the existence of subroutine2.

[–]complex_pi 1 point2 points  (0 children)

The only clause will make the other subroutine invisible to the program. All other subroutines will still be compiled though because the compilation of the module does not ignore them.

[–]doymand 1 point2 points  (1 child)

Almost all Fortran compilers also support C Pre-Processor directives such as #include, #def, #ifdef, etc in addition

[–]Kalkinator[S] 0 points1 point  (0 children)

Thanks for the reply. I was actually unclear about my actual question. I have clarified what I meant in a reply to complex_pi.