正四棱锥外接球球心:「ASP」这代码提示“缺少Next”,编译器瞎了吧?

来源:百度文库 编辑:高考问答 时间:2024/05/05 00:42:53
_代码如下

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) & ChrB(0)
Case 3 Response.BinaryWrite ChrB(0)
End Select
Next
%>

同意楼上说法,自己编译的代码有问题却埋怨"编译器".
哥们你够牛

你的代码非常地乱。。

像你上面的代码,缺少任一个结束标识都有可能提示这个的。

比如: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()

我不知道你这些代码是不是都是同一行的。。只要缺少一个END IF,也会提示缺少NEXT