Unconditional Jump (GoTo)

The GoTo command can be used to jump to a label defined in the function. A return to a code fragment in front can be achieved with another GOTO to a second label.

A label is identified by the keyword Label.

 

Function DoAny (ByVal Parameter1 As Long) As Long

 

   If Parameter1 = 10 Then

      Goto JumpLabel

   End If

 

Label Ready

 

   Exit Function 0

  

Label JumpLabel

   TuWas := 100

   Goto Ready

End Function