SecondBASIC Documentation v3
Home
/
Command Reference
/
On
On
Description:
During the <Event>, the program will jump to the specified routine. The routine should be ended with a
Return
.
Syntax:
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.
Example
:
On vInt GoSuB MyVblank
Enable vInt
While 1
Locate 1,1
Print b
Sleep 1
Wend
MyVblank: a++
If a = 60 Then
b++
a = 0
End If
Return