subroutine a_sub(arg1, arg2, arg3) integer, intent(in) :: arg1, arg2 integer, intent(out), optional :: arg3 ! ... end subroutine a_sub