asp字符串和数字转换问题求助,立即揭帖
传入起始位置n1,终止位置n2,步长step,打印出n1,n3中的值:n1,n1+step,n1+2*step,....一直到<=n2为止。
比如:test.asp?n1=3&n2=64&step=4
在我的asp里怎么写?
n1=Request.QueryString("n1")
n2=Request.QueryString("n2")
step=Request.QueryString("step")
s=n1
n3=n1
while (n3+step)<=n2
s=s+","+(n3+step)
n3=n3+step
wend
Response.Write s
执行asp表明上面的是错的,死循环。因为n3,step都是字符串,n3+step是不是两将字符串连起来了,而不是相加??怎样让它们相加?
请帮忙改正上面的代码,谢谢!!