subroutine swap_z(a,b) complex(8), intent(inout) :: a,b complex(8) :: dum dum=a a=b b=dum end subroutine swap_z