Question on the use of 'Return'
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
What's the difference between
try
body
catch
return
end
and
try
body
end
0 comentarios
Respuesta aceptada
Walter Roberson
el 2 de Mzo. de 2013
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!