Permute Subroutine Arguments

Description:  This refactoring will change the order of the arguments to a subroutine and adjust all call sites accordingly.

State: Implemeted         Author:  Matt Fotzler      Version:  Planned in Photran 7

Code Example:

program basictest
    call simple(4,3,2)
   
    call simple(4,Gamma=2,Beta=3)
end program basictest

subroutine simple(Alpha, Beta, Gamma)
    integer, intent(in) :: Alpha
    integer, intent(out) :: Beta
    integer, intent(inout) :: Gamma
end subroutine

    program basictest
    call simple(2,3,4)
    
    call simple(Gamma=2,Beta=3,Alpha=4)
end program basictest

subroutine simple( Gamma, Beta,Alpha)
    integer, intent(in) :: Alpha
    integer, intent(out) :: Beta
    integer, intent(inout) :: Gamma
end subroutine 

ScreenShots

            

HTML Comment Box is loading comments...