VB实时错误9,下标越界~~~求怎么改
计算到这一部分出错了Case 2 '组法方程
Text1.Visible = False
Dim n1 As Integer, n2 As Integer, l1 As Double, pp As Double
ll = 0
n1 = zds - yds
n2 = n1 * (n1 + 1) / 2
ReDim NX(n2), UX(n1)
Call order(mm(), yds)
For i = 1 To cds
k1 = nl(i - 1) + 1: k2 = nl(i)
For k = k1 To k2
ReDim nb(n1)
h = seqn(zd1(k))
cha = charact(i, j)
If cha = "n" Then
d = i - j
nb(d) = -1
End If
cha = charact(h, j)
If cha = "n" Then
d = h - j
nb(d) = 1
End If
ll = (z(h) - z(i) - g(k)) * 100 (提示在这一行出错了)
pp = 200 / s1(k)
Call equation(nb(), pp, l1)
ll = ll + pp * l1 ^ 2
Next k
Next i
Text1.Visible = False
MsgBox ("法方程组成完毕")
adj(1).Enabled = False
adj(3).Enabled = True
adj(0).Enabled = False
adj(2).Enabled = False
End Select
End Sub --------------------编程问答-------------------- 错误信息呢? 你有没有看看出错的时候表达式里面每个变量的值? --------------------编程问答-------------------- 可不可以段点debug --------------------编程问答-------------------- 在出错的行打断点,分别查看 h,i,k 的值。
--------------------编程问答-------------------- VB IDE中弹出出错提示框时点调试按钮。
补充:VB , 网络编程