This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / Web programmer take a look please. Thank you very much.
Array can't be converted into number?
-waokool(waokool);
2002-6-16
{1030}
(#581759@0)
-
感觉想数组溢出了,dim col(2)好象只有col(1) 和col(0),没有col(2)的
-hugefox(长得象熊的狐狸);
2002-6-17
(#582569@0)
-
You are wrong. Dim col1(2) has 3 variable3 col1(0),col1(1),col1(2).
-waokool(waokool);
2002-6-17
(#582865@0)
-
俺没用过ASP,不过你这错误倒也明显就是既然定义了dim col1(2),就说明只有两个元素喽。但是你又接着写col1[0]=0, col1[1]=x, col1[2]=y, 当然就不对啦。想求和,在for外面定义一个sum=0; 然后在for里面sum+=col1[i]即可。
-xanada(㊣流水);
2002-6-17
{173}
(#582578@0)
-
the problem is col1(i)=TRIM(Request("col1(i)"))you should use
col1(i)=TRIM(Request("col1(" & i & ")"))
-hainan(hainan);
2002-6-17
{60}
(#582596@0)
-
good try. But it doesn't work. I think problem occurs in the data type within the cINT. It looks like cINT (clo1(i)) is wrong accroding to the IE response.
-waokool(waokool);
2002-6-17
(#582877@0)
-
the array index is begin from 0. So you don't have col1(2).
-benbendan(笨笨蛋);
2002-6-17
(#582651@0)
-
the definition of C and VB is different.
-hainan(hainan);
2002-6-17
(#582656@0)
-
you look like a girl programmer
-rootbear(啤酒);
2002-6-17
{824}
(#582814@0)
-
Great! It works. Rootbear, you solved the problem for me. Thanks you very much.Other friends, thank you anyway, and check out how Rootbear solve this problem.
-waokool(waokool);
2002-6-17
(#582892@0)