主题:请教asp问题
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>投票结果</title>
</head>
<body bgcolor="#f2eadd">
<p align="center">☆感谢您参加本次网上投票调查☆</p>
<hr />
<table width="600" border="1" bordercolor="#00qqee" cellpadding="0" cellspacing="0" align="center">
<tr><td colspan="3" align="center">下表是目前的投票结果</td>
</tr>
<tr>
<td align="center">所选的操作系统</td><td align="center">目前得票数</td><td align="center">得票率</td>
</tr>
<%
dim selected,nowcnt,nowtime
redim percent(4)
redim name(5)
redim count(5)
application.lock
selected=cint(request.Form("os"))
set fso=server.CreateObject("scripting.filesystemobject")
filepath=server.MapPath("result.txt")
set getcnt=fso.opentextfile(filepath,1,0,0)
i=0
do while not getcnt.atendofstream
temp=getcnt.readline
name(i)=left(rtrim(temp),7)
count(i)=right(rtrim(temp),7)
if i=selected then
j=cdbl(count(i))+1
count(i)=right(space(8) & trim(cstr(j)),8)
end if
i=i+1
loop
getcnt.close
set writecnt=fso.createtextfile(filepath,-1,0)
nowcnt=0
for j=0 to 4
nowcnt=nowcnt+cdbl(count(j))
writecnt.writeline name(j) & count(j)
next
nowtime=now()
count(5)=nowtime
writecnt.writeline name(5) & count(5)
writecnt.close
application.UnLock()
for j= 0 to 4
percent(j)=cdbl(count(j))/cdbl(nowcnt)
%>
<tr>
<td><% response.Write(trim(name(j))) %>
</td>
<td><%response.Write(formatnumber(count(j),0))%>
</td>
<td><%response.Write(formatpercent(percent(j)))%>
</td>
</tr>
<%next%>
</table>
</body>
</html>
它提示我第34行类型不匹配,我该怎么做,头好晕啊!我觉得没错啊
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>投票结果</title>
</head>
<body bgcolor="#f2eadd">
<p align="center">☆感谢您参加本次网上投票调查☆</p>
<hr />
<table width="600" border="1" bordercolor="#00qqee" cellpadding="0" cellspacing="0" align="center">
<tr><td colspan="3" align="center">下表是目前的投票结果</td>
</tr>
<tr>
<td align="center">所选的操作系统</td><td align="center">目前得票数</td><td align="center">得票率</td>
</tr>
<%
dim selected,nowcnt,nowtime
redim percent(4)
redim name(5)
redim count(5)
application.lock
selected=cint(request.Form("os"))
set fso=server.CreateObject("scripting.filesystemobject")
filepath=server.MapPath("result.txt")
set getcnt=fso.opentextfile(filepath,1,0,0)
i=0
do while not getcnt.atendofstream
temp=getcnt.readline
name(i)=left(rtrim(temp),7)
count(i)=right(rtrim(temp),7)
if i=selected then
j=cdbl(count(i))+1
count(i)=right(space(8) & trim(cstr(j)),8)
end if
i=i+1
loop
getcnt.close
set writecnt=fso.createtextfile(filepath,-1,0)
nowcnt=0
for j=0 to 4
nowcnt=nowcnt+cdbl(count(j))
writecnt.writeline name(j) & count(j)
next
nowtime=now()
count(5)=nowtime
writecnt.writeline name(5) & count(5)
writecnt.close
application.UnLock()
for j= 0 to 4
percent(j)=cdbl(count(j))/cdbl(nowcnt)
%>
<tr>
<td><% response.Write(trim(name(j))) %>
</td>
<td><%response.Write(formatnumber(count(j),0))%>
</td>
<td><%response.Write(formatpercent(percent(j)))%>
</td>
</tr>
<%next%>
</table>
</body>
</html>
它提示我第34行类型不匹配,我该怎么做,头好晕啊!我觉得没错啊