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!