「ASP」这代码提示“缺少Next”,编译器瞎了吧?

来源:百度知道 编辑:UC知道 时间:2024/06/23 00:16:50
_代码如下

For i = 10 to 0 Step -1
For j = 0 to Text_Len - 1
For k = 1 to 9 Step 2
If Mid(Text_Data(Int_Temp(j)) , i * 10 + k , 1) = "0" Then Int_Temp2 = Get_BackColor() * 16
Else Int_Temp2 = Get_ForeColor() * 16
If Mid(Text_Data(Int_Temp(j)) , i * 10 + k + 1 , 1) = "0" Then Int_Temp2 = Int_Temp2 + Get_BackColor()
Else Int_Temp2 = Int_Temp2 + Get_ForeColor()
Response.BinaryWrite ChrB(Int_Temp2)
Next
Next
Int_Temp2 = (Text_Len / 4 - Text_Len \ 4) * 4
Select Case Int_Temp2
Case 1 Response.BinaryWrite ChrB(0) & ChrB(0) & ChrB(0)
Case 2 Response.BinaryWrite ChrB(0) & ChrB(0)
Case 3 Response.BinaryWrite ChrB(0)
End Select
Next

_代码如上

3个FOR```3个NEXT`````居然缺少NEXT`

我尝试在各种地方多加几个NEXT(最多加了5个),不但不提示NEXT多了,竟然还是“缺少”!!!

瞎子编译器!!!!!!!!

事实上不是NEXT的问题,是你IF语句的问题。
哪有象:

if 条件 then 语句1
else 语句2

这样的IF语句啊,你全都用错了?



if 条件 then
语句1
else
语句2
end if

这样才可以。

下面是我修改后的代码,你看看还有问题吗?

<%
For i = 10 to 0 Step -1
For j = 0 to Text_Len - 1
For k = 1 to 9 Step 2
If Mid(Text_Data(Int_Temp(j)) , i * 10 + k , 1) = "0" Then
Int_Temp2 = Get_BackColor() * 16
Else
Int_Temp2 = Get_ForeColor() * 16
end if
If Mid(Text_Data(Int_Temp(j)) , i * 10 + k + 1 , 1) = "0" Then
Int_Temp2 = Int_Temp2 + Get_BackColor()
Else
Int_Temp2 = Int_Temp2 + Get_ForeColor()
end if
Response.BinaryWrite ChrB(Int_Temp2)
Next
Next
Int_Temp2 = (Text_Len / 4 - Text_Len \ 4) * 4
Select Case Int_Temp2
Case 1 Response.BinaryWrite ChrB(0) & ChrB(0) & ChrB(0)
Case 2 Response.BinaryWrite ChrB(0