无效的过程和参数是怎么回事?
我在VB编程中,遇到如下的问题:有两个几乎一模一样的式子,一个可以编译运行,另一个就会出现“无效的过程和参数”的提示。代码如下:Private Sub Command1_Click()
Dim la As Double, lb As Double, lc As Double, ld As Double
Dim lp As Double, lq As Double, lmd As Double
Dim lmc As Double, lmx As Double, cc As Double, ff As Double
Dim det1 As Double '判别公式
la = 2: lb = 6: lc = 10: ld = -78
lp = -lb * lb / (la * la * 3) + lc / la
lq = 2 * lb * lb * lb / (27 * la * la * la) - lb * lc / (3 * la * la) + ld / la
det1 = lq * lq / 4 + lp ^ 3 / 27
lmc = (-lq / 2 - Sqr(lq * lq / 4 + lp ^ 3 / 27)) ^ (1 / 3) '就这个式子,中间的“-”变成“+”就不会有问题,但是“-”就会出现“无效的过程和参数”的提示,请问这是怎么回事?
end sub