D
Devin Linnington
Hi, I'm doing a simple program that worked fine but when i started to debug
it with sample data, I stumbled upon an error that I can't possibly explain.
It apears that while to compile this paticular function, when it reaches the
'GoTo 6' (as in goto label 6) it thinks there is no label 6 in the function
(It gives me the error 'label not defined') . This is obviously not the case,
just look at the code below!
2:
If xarg <= x(1) Then GoTo 4
If xarg >= x(n) Then GoTo 5
GoTo 6 <== where
it reaches error
3:
If xarg >= x(1) Then GoTo 4
If xarg <= x(n) Then GoTo 5
GoTo 6
4:
flagr = y(1)
End Function
5:
flagr = y(n)
End Function
' Determine value of max1
6: <== supposed
to go here....
Select Case l
Case 1
GoTo 10
Case 2
GoTo 20
End Select
Ignoring the comments and variables, it's pretty easy to see that there is
indeed a label 6 right there! I have other labels that it has to go through
earlier in the code, and they are writen in the same fashion as the '6:' one.
I have totally run out of options of what I can do here, as even changing the
'6' to something else doesn't fix the problem. Also, it is a compiler error
so that the function doesn't even run. What really gets me is that all I did
was change the variables being entered into the function, so somehow that
affected the compiler and now it doesn't like that label (note that it did
work for other values). I'm really stuck now, I just don't know what is going
on!
it with sample data, I stumbled upon an error that I can't possibly explain.
It apears that while to compile this paticular function, when it reaches the
'GoTo 6' (as in goto label 6) it thinks there is no label 6 in the function
(It gives me the error 'label not defined') . This is obviously not the case,
just look at the code below!
2:
If xarg <= x(1) Then GoTo 4
If xarg >= x(n) Then GoTo 5
GoTo 6 <== where
it reaches error
3:
If xarg >= x(1) Then GoTo 4
If xarg <= x(n) Then GoTo 5
GoTo 6
4:
flagr = y(1)
End Function
5:
flagr = y(n)
End Function
' Determine value of max1
6: <== supposed
to go here....
Select Case l
Case 1
GoTo 10
Case 2
GoTo 20
End Select
Ignoring the comments and variables, it's pretty easy to see that there is
indeed a label 6 right there! I have other labels that it has to go through
earlier in the code, and they are writen in the same fashion as the '6:' one.
I have totally run out of options of what I can do here, as even changing the
'6' to something else doesn't fix the problem. Also, it is a compiler error
so that the function doesn't even run. What really gets me is that all I did
was change the variables being entered into the function, so somehow that
affected the compiler and now it doesn't like that label (note that it did
work for other values). I'm really stuck now, I just don't know what is going
on!