Table of Contents

5.4.2.11 Stop Statement

Note

This section describes the implementation of MS-VBAL §5.4.2.11 Stop Statement.

Syntax

AST node Instruction kind(s) Notes
KeywordStatementNode (Token: Stop) Break; Halt in a release build No resolved target.

See RD-VBAL §3.4.2 Simple Statements and RD-VBAL §3.5.2 Instruction.

Runtime Semantics

The executor dispatches Break for Stop.

An encountered Stop is a semantic break: it enters Break mode (RD-VBAL §2.3.2 Mode / State).

In a release build there is no debugger to break into, and Stop ends the program as End does (RD-VBAL §5.4.2.22 End Statement): it lowers to Halt, the way a compiled VB6 executable runs it. The statements after it do not run. A release build is one whose DEBUG conditional-compilation constant is False: by default when Environment.Configuration is Release (RD-VBAL §2.3.3 Configuration), and otherwise when the project defines DEBUG = 0.

Implementation

ProcedureExecutor dispatches InstructionKind.Break, and in a release build InstructionKind.Halt (RD-VBAL §3.5.4 Execution).