5.4.5.10 Input Statement
Note
This section describes the implementation of MS-VBAL §5.4.5.10 Input Statement.
Syntax
| AST node | Instruction kind(s) | Notes |
|---|---|---|
| KeywordStatementNode | Simple |
Token: Input. |
See RD-VBAL §3.4.3 File Statements.
Runtime Semantics
Input # reads the text format Write # writes: a String is a quoted string, and the format includes the tokens
#TRUE#, #NULL#, #ERROR n# and #yyyy-mm-dd hh:mm:ss#. See
RD-VBAL §5.4.5.9 Write Statement for the format.
The number of characters Input # reads depends on the declared type of the variable it reads into, so Input #
resolves the target before it reads the target's field. For its target, Input #:
- Resolves the target variable, with the same target resolution the Let assignment statement uses (RD-VBAL §5.4.3.8 Let Statement).
- Reads the target's field from the file, through the channel's character input surface.
- Let-assigns what it read to the target, as MS-VBAL §5.4.5.10 specifies.
Implementation
| Name | Role |
|---|---|
| IFileChannelInput | The character input surface of a channel, shared with Line Input # (RD-VBAL §5.4.5 File Statements). |
LetAssignmentEvaluator.TryResolveTarget |
Resolves the target: the same target resolution Line Input #, Get and the Let assignment statement use. |
⏮️ RD-VBAL §5.4.5.9 Write Statement | ⏭️ RD-VBAL §5.4.5.11 Put Statement