类型不匹配: 'CInt' 请问怎么修改

来源:百度知道 编辑:UC知道 时间:2024/04/29 06:34:24
Microsoft VBScript 运行时错误 '800a000d'

类型不匹配: 'CInt'

\Member\Myacc_Info_Buy.asp, line 18

代码如下:

Function getWord(byval Val)
num = CInt(Val)
If num = 0 Then
getWord = "保密"
ElseIf num = 1 Then
getWord = "公开"
Else
End If
End Function

Response.Expires = 0
Const PageSize = 12 '每页记录数
Page = request("Page")
If Not IsNumeric(page) Then page = 1
If Page<= 0 Then Page = 1
'''''''''''''''
Dim Title, Bottom, Middle, TitleInfo, sql, rs, u1, text1, text2, wxl, ID
wxl = Request("wxl")
If wxl = "del" Then
ID = mainCls.DelStr(Request("ID"))
If Id = "" Then Call mainCls.BackHtmlWithUrl("系统期待参数非法","/Member/Myacc_Info_buy.asp")
If Not

Function getWord(byval Val)
这个函数使用的时候,参数必须是数字,否则的话他就提示错误了.
不然的话改一下这句"num = CInt(Val)"
改成
if isnumeric(val) then
num=cint(val) '参数是数字的话就赋值
else
num=0 '否则的话默认是不公开的参数0
end if

----
Call HtmlHead("留言回复")
这个提示错误可能跟HTMLHEAD这个函数的定义有关系
检查一下,把这个函数的代码发出来