【发布时间】:2018-11-01 03:25:42
【问题描述】:
我创建了一个名为length 的新函数,它测试字符数并在字符数大于 5 时显示“错误结果”。
但是,函数的结果是#NUM!如果测试是 5 个字符或更少,则会显示结果。
怎么了?
Function length (number as integer)
If ( Len (CStr (number)) > 5 ) then
length = "error"
End if
If ( Len (Cstr (number)) <6) then
length = "the count is true"
End if
End Function
【问题讨论】: