Table of Contents

5.4.5.1 Open Statement

Note

This section describes the implementation of MS-VBAL §5.4.5.1 Open Statement.

Syntax

AST node Instruction kind(s) Notes
OpenStatementNode Simple Mode, Access and Lock are keyword choices, not expressions. They are typed VBFileMode, VBFileAccessMode and VBFileLockMode.

See RD-VBAL §3.4.3 File Statements.

Runtime Semantics

The session's file-channel shim holds the numbered channels Open opens. Each channel records the mode it was opened under (RD-VBAL §5.4.5 File Statements).

The statement/mode/access table of MS-VBAL §5.4.5.1 is held once, for every file statement; see RD-VBAL §5.4.5 File Statements.

MS-VBAL §5.4.5.1 constrains the Len clause but does not say what an absent Len clause means. A Random channel whose Open statement declared no Len clause counts positions in 128-byte records, MS-VBA's own default record length; see RD-VBAL §5.4.5.11 Put Statement.

Implementation

Name Role
IFileChannels Holds the numbered channels, each with the mode it was opened under.
FileStatementAccess Holds MS-VBAL §5.4.5.1's statement/mode/access table.

5.4.5.1.1 File Numbers

This section corresponds to MS-VBAL §5.4.5.1.1 File Numbers.

Note

Reserved. This section has no content yet.


⏮️ RD-VBAL §5.4.5 File Statements | ⏭️ RD-VBAL §5.4.5.2 Close and Reset Statements