End Statement
Ends a procedure or block.
Syntax:
End, End Function, End If, End Select, End Sub
Paremetre:
Use the End statement as follows:
príkazy
End: Is not required, but can be entered anywhere within a procedure to end the program execution.
End Function: Ends a Function statement.
End If: Marks the end of a If...Then...Else block.
End Select: Marks the end of a Select Case block.
End Sub: Ends a Sub statement.
Príklad:
Sub ExampleRandomSelect
Dim iVar As Integer
iVar = Int((15 * Rnd) -2)
Select Case iVar
Case 1 To 5
Print "Číslo je od 1 do 5"
Case 6, 7, 8
Print "Číslo je od 6 do 8"
Case Is > 8 And iVar < 11
Print "Väčšie ako 8"
Case Else
Print "Mimo rozsahu 1 až 10"
End Select
End Sub