the_eagle_eyes
01-03-2005, 03:05 PM
Here is a copy of code I already have I am having trouble jumping out of the recursive loop when intLoop is -1. Any suggestions? :confused:
Function path(u As Integer, v As Integer, Q() As Integer) As Integer
Dim intLoop As Integer
intLoop = Q(u, v)
' Try if statements instead of case
Select Case (intLoop)
Case -1
'this is where I want to jump out of this function
Case 0
m = "A"
Case 1
m = "B"
Case 2
m = "C"
Case 3
m = "D"
Case 4
m = "E"
Case 5
m = "F"
Case 6
m = "G"
End Select
path = path(u, intLoop, Q)
txtPath.Text = m & "->"
End Function
Function path(u As Integer, v As Integer, Q() As Integer) As Integer
Dim intLoop As Integer
intLoop = Q(u, v)
' Try if statements instead of case
Select Case (intLoop)
Case -1
'this is where I want to jump out of this function
Case 0
m = "A"
Case 1
m = "B"
Case 2
m = "C"
Case 3
m = "D"
Case 4
m = "E"
Case 5
m = "F"
Case 6
m = "G"
End Select
path = path(u, intLoop, Q)
txtPath.Text = m & "->"
End Function