Table of Contents

5.4.3 Data Manipulation Statements

Note

This section describes the implementation of MS-VBAL §5.4.3 Data Manipulation Statements.

Each data manipulation statement is listed below with the node the parser produces for it, the instruction kind it lowers to, and the RD-VBAL page that describes its implementation. The node catalog is in RD-VBAL §3.4.2 Simple Statements; instruction kinds are described in RD-VBAL §3.5.2 Instruction.

Statement AST node Instruction kind RD-VBAL
Dim, Static (in a procedure body) VariableDeclarationNode — (a declaration node; the local is hoisted when the procedure is invoked) RD-VBAL §5.4.3.1 Local Variable Declarations
Const (in a procedure body) ConstantDeclarationNode — (a declaration node) RD-VBAL §5.4.3.2 Local Constant Declarations
ReDim, ReDim Preserve RedimDeclarationNode — (a declaration node) RD-VBAL §5.4.3.3 ReDim Statement
Erase KeywordStatementNode (Token: Erase) Simple RD-VBAL §5.4.3.4 Erase Statement
Mid, Mid$, MidB, MidB$ MidStatementNode Simple RD-VBAL §5.4.3.5 Mid/MidB/Mid$/MidB$ Statement
LSet AssignmentStatementNode (Kind: LSet) Simple RD-VBAL §5.4.3.6 LSet Statement
RSet AssignmentStatementNode (Kind: RSet) Simple RD-VBAL §5.4.3.7 RSet Statement
Let assignment ([Let] lExpression = expression) AssignmentStatementNode (Kind: ImplicitLet or ExplicitLet) Simple RD-VBAL §5.4.3.8 Let Statement
Set assignment AssignmentStatementNode (Kind: Set) Simple RD-VBAL §5.4.3.9 Set Statement

Let, Set, LSet and RSet share one node type, AssignmentStatementNode, distinguished by its AssignmentKind Kind. A Simple instruction's statement is dispatched by its own type to its statement runtime semantics; see RD-VBAL §3.5.4 Execution.


⏮️ RD-VBAL §5.4.2.23 Assert Statement | ⏭️ RD-VBAL §5.4.3.1 Local Variable Declarations