Exit

Last Modified: 1/3/2021

Exits out of the current Scope.

Arguments

NameTypeRequiredDescription
Scope Keyword Yes The Scope you're exiting.

Scope types

ScopeType
Case
Do, Loop
For
Function
Sub
While

Example

Syntax: Exit <Scope>
    x = 0
    Do
        x++
        If x = 5 Then Exit Do
    Loop
    Print x

Remarks

Exiting out of a Function will not return any results. Exiting out of a Case is required. Exiting out of any loop will jump you out of the loop and continue code execution as normal.

See Also

Declare, Do...Loop, For...Next, Select Case, While...Wend