Unconditional jump with return (GoSub)

GOSUB is a leap to executable code after a label. The code below the label must be completed with the END GOSUB command to jump back to the next code behind the calling GOSUB or with END FUNCTION or EXIT FUNCTION or RETURN, so the execution of the function will be ended.

Nach Erreichen des Befehls END GOSUB wird in der Programmzeile nach dem GOSUB fortgesetzt.

 

Function DoAny (ByVal Parameter1 As Long) As Long

 

   If Parameter1 = 10 Then

      Gosub JumpLabel

   End If

 

   If Parameter1 = 20 Then

      Return 20

   End If

 

   Return 0

  

Label JumpLabel

   Parameter1 := Parameter1 + 20

End Gosub

End Function