program impint implicit none integer, parameter :: n=4 integer, dimension(n) :: iv=(/3,1,4,2/) integer :: iw, how how = -1 call sort(iv, n, how) print *, iv(1:n), how contains subroutine sort(iv,n,how) integer, dimension(:), intent(in) :: iv(:) integer, intent(in) :: n integer, intent(inout) :: how ................... end subroutine sort end program impintIn this case the interface of sort with the main program is explicit.