"pass" statement
Posted: 02 Jul 2023, 14:13
On the page for try, there is a try-catch-else construct.
If you don't need the catch to do anything, and you can't use return (as that would end the auto-execute section) a ("pass") string in parenthesis should be recommended:
In other words, this is only if you need try-else without catch. It would be unintuitive for new users to figure this out themselves.
If you don't need the catch to do anything, and you can't use return (as that would end the auto-execute section) a ("pass") string in parenthesis should be recommended:
Code: Select all
try Run "file.txt"
catch
("pass") ; or ("Do nothing")
else ; Runs only if opening the file succeded
MsgBox "file opened"