SecondBASIC Documentation v3

Home / Command Reference / On


Description: During the <Event>, the program will jump to the specified routine. The routine should be ended with a Return.


On <Event> GoSub <LineLabel>

Part Description
<Event> Required. Valid Event Types are:
  • ExtInt
  • hInt
  • vInt
<LineLabel> Required. The line label where the <Event> will jump to when enabled.


    On vInt GoSuB MyVblank
    Enable vInt
    While 1
        Locate 1,1
        Print b
        Sleep 1
MyVblank:     a++
    If a = 60 Then
        a = 0
    End If