Code: Select all
if 1
try MsgBox({})
else
try MsgBox({})
Code: Select all
if 1 {
try MsgBox({})
} else
try MsgBox({})
Code: Select all
if 1
try MsgBox({})
Code: Select all
if 1
try MsgBox({})
else
try MsgBox({})
Code: Select all
if 1 {
try MsgBox({})
} else
try MsgBox({})
Code: Select all
if 1
try MsgBox({})
Alternatively something like If Try or IfTry for cases where we have no need to do something with the error. There seems to be something similar in Swift and Rust according to this. Or, to take it even further, a Try() that returns true/false and can be used inside expressions.
Code: Select all
try a
catch {
try b
catch {
try c
catch {
}
}
}
Else cannot belong to a Try statement (only a Catch statement), therefor the Else should terminate the Try statement and belong to the nearest applicable unclaimed statement. But apparently the Try statement instead of the Catch statement, claims the Else.Every use of an Else must belong to (be associated with) an If statement, Catch, For, Loop or While statement above it. An Else always belongs to the nearest applicable unclaimed statement above it unless a block is used to change that behavior.
and:
Code: Select all
if false
try
sleep 50
msgbox "base level"
Code: Select all
if false
try
sleep 50
else
msgbox "else if"
Users browsing this forum: No registered users and 38 guests