Re: Help with wierd/unexplainable error
- From: "Dave" <noone@xxxxxxxxxxx>
- Date: Tue, 28 Jun 2005 20:41:55 -0000
that is because 6 is after two 'end function' lines, so it never gets there.
change the 'end function' to 'exit function' if you want to exit without
ending
"Devin Linnington" <DevinLinnington@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:31B0B487-139B-4FBF-80EF-69961D7D8F6D@xxxxxxxxxxxxxxxx
> 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!
.
- Follow-Ups:
- Re: Help with wierd/unexplainable error
- From: Devin Linnington
- Re: Help with wierd/unexplainable error
- References:
- Help with wierd/unexplainable error
- From: Devin Linnington
- Help with wierd/unexplainable error
- Prev by Date: Help with wierd/unexplainable error
- Next by Date: RE: help calling function!!!!! novice
- Previous by thread: Help with wierd/unexplainable error
- Next by thread: Re: Help with wierd/unexplainable error
- Index(es):
Relevant Pages
|