Table of Contents

5.6.12 Member Access Expressions

Note

This section describes the implementation of MS-VBAL §5.6.12 Member Access Expressions.

Syntax

Expression AST node
Member access MemberAccessExpressionNode

See RD-VBAL §3.0.2 Node Types.

Static Semantics

A member access reads the members of a class or user-defined type from the type's declaration, by the type's own identity. A class whose member is typed as the class itself therefore resolves through any number of chained member accesses. See RD-VBAL §2.3.1.3 Name Resolution.

For a predeclared class Widget, Widget.Size is a member access on a variable of type Widget. See RD-VBAL §3.1.1.6 VB_PredeclaredId.

Runtime Semantics

A UDT field is reachable from source code in both directions, read and write:

Direction Source Effect
Read A <member-access-expression> Reads the UDT field.
Write A Let statement whose target is a UDT field (RD-VBAL §5.4.3.8 Let Statement) Let-coerces the value to the field's own declared type, and writes the field's cell.

A UDT's fields are held in its field store. See RD-VBAL §2.5.2.1.3 User-Defined Type (UDT) Values.


⏮️ RD-VBAL §5.6.11 Instance Expressions | ⏭️ RD-VBAL §5.6.13 Index Expressions