注册 登录
编程论坛 ASP.NET技术论坛

求高手帮小弟解释下以下代码!真心看不懂哇!!!

qadzz 发布于 2013-05-12 12:51, 671 次点击
if isId(id) then
        dim arr
        arr=array(0,0,0,0,0,0,0)
        for i=0 to ubound(inArray,2)
            response.write "<tr>"
            response.write "<td noWrap>"&inArray(0,i)&"&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(inArray(1,i),2)&"&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(inArray(2,i),2)&"&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(inArray(3,i),2)&"&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(inArray(4,i),2)&"&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(inArray(5,i),2)&"&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(inArray(7,i),2)&"&nbsp;</td>"
            response.write "<td noWrap>&nbsp;"&inArray(6,i)&"&nbsp;</td>"
            response.write "</tr>"
            arr(0)=arr(0)+Cdbl(inArray(1,i))
            arr(1)=arr(1)+Cdbl(inArray(2,i))
            arr(2)=arr(2)+Cdbl(inArray(3,i))
            arr(3)=arr(3)+Cdbl(inArray(4,i))
            arr(4)=arr(4)+Cdbl(inArray(5,i))  
            arr(5)=arr(5)+Cdbl(inArray(7,i))
        next
            response.write "<tr>"
            response.write "<td noWrap>合计&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(arr(0),2)&"&nbsp;</td>"     '这个地方最需要注释了,实在搞不懂这合计怎么算的- -!
            response.write "<td noWrap>&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(arr(2),2)&"&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(arr(3),2)&"&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(arr(4),2)&"&nbsp;</td>"
            response.write "<td noWrap>"&formatNum(arr(5),2)&"&nbsp;</td>"
            response.write "&nbsp;<td noWrap>&nbsp;</td>"
            response.write "</tr>"
    end if
1 回复
#2
邓士林2013-05-12 13:40
你看下http://baike.baidu.com/view/2260919.htm
1