Question on the use of 'Return'
조회 수: 1 (최근 30일)
이전 댓글 표시
What's the difference between
try
body
catch
return
end
and
try
body
end
댓글 수: 0
채택된 답변
Walter Roberson
2013년 3월 2일
try/catch followed by return has the effect of returning to the calling routine when an error is detected, without executing any following code. try with no catch, or try/catch that does not have a return (or exit or quit or error()) in the catch, continues executing after the try/end even if an error occurred.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!