_try{...}这个函数是怎样的?

来源:学生作业帮助网 编辑:作业帮 时间:2024/10/06 02:12:09
_try{...}这个函数是怎样的?
xSoPW^84%+4;,1Lau4v-)ŌM Ab aeY-%/,fA^}>/rZ\?,dq 3Tw-;jo\']|65>k&2: VŸ:ЃAXp(rpwa`lNQÂ3{dQb}d),;Z̽PȌ訋V*Z&f8Fn 6%9^NFp,k1F54pgthMsT5 <.MTdAg=?-σRHKB[&?>PA<\)AUZVrH;k$Iޒ>/|G\6A?6rRyI*<hf]^7##yg14+l 1xQM.V9_z QO{gJ7h[SoP2

_try{...}这个函数是怎样的?
_try{...}这个函数是怎样的?

_try{...}这个函数是怎样的?
try{}这不是一个函数,是一个语句块,如果加了try{}标识如果这一块语句有问题的话,任然可以通过编译,错误会被忽略,这是一套语句,还应该有捕捉的catch语句来捕捉异常.

运行下面程序时,try被提示“Private Function Try()
Dim aNumber As Double
aNumber = CDbl(Text1.Text)
MsgBox ("You entered the number " & aNumber)
catch
MsgBox ("Please enter a number.")...

全部展开

运行下面程序时,try被提示“Private Function Try()
Dim aNumber As Double
aNumber = CDbl(Text1.Text)
MsgBox ("You entered the number " & aNumber)
catch
MsgBox ("Please enter a number.")
finally
MsgBox ("Why not try it again?")
End Try
click事件中调用Try()就行了。子程序或函数未定义”,

收起