Modul
Isi
Indeks 🔎︎

# End Statement

Mengakhiri prosedur atau blok.

## Sintaksis:

    End, End Function, End If, End Select, End Sub

## Parameter:

Gunakan pernyataan End seperti berikut:

## statements

End: Is not required, but can be entered anywhere within a procedure to end the program execution.

End Function: Mengakhiri pernyataan Function.

End If: Marks the end of a If...Then...Else block.

End Select: Marks the end of a Select Case block.

End Sub: Mengakhiri pernyataan Sub.

## Contoh:

    Sub ExampleRandomSelect

    Dim iVar As Integer

        iVar = Int((15 * Rnd) -2)

        Select Case iVar

            Case 1 To 5

                Print "Angka dari 1 sampai 5"

            Case 6, 7, 8

                Print "Angka dari 6 sampai 8"

            Case Is > 8 And iVar < 11

                Print "Lebih besar dari 8"

            Case Else

                Print "Di luar jangkauan 1 sampai 10"

        End Select

    End Sub