hi everybody i have problem on calling a subroutine that contains in a module through my main program . this is my simple code : main program:
program swapmain use SWAPMOD ! use statements must come first real :: a, b ! Read in two values read(,) a, b call swap(a,b) write(,) a, b end program swapmain
module swapmod implicit none contains ! routines provided by this module subroutine swap(x,y) real :: x, y, temp temp = x x = y y = temp end subroutine swap end module swapmod