Table of Contents

Class FileStatementStaticSemantics

Namespace
RDCore.SDK.Semantics.Static
Assembly
RDCore.SDK.dll

MS-VBAL §5.4.5 the file statements (static semantics), and the Name statement that sits beside them (RD-VBAL §5.4.5.13).

public static class FileStatementStaticSemantics
Inheritance
FileStatementStaticSemantics
Inherited Members

Remarks

What each statement's operands have to be declared as:

OperandRule
a file number (§5.4.5.1.1), a Seek position, a Lock or Unlock record number, a Width line width, a Spc or Tab numbera scalar declared type: any but an array or a user-defined type.
the path name of an Open, and the record length of its Len clauseLet-coercible to String, and to Integer.
the Access of an Openthe ones its For mode allows (§5.4.5.1).
the variable of a Line Input #a variable, declared as a String or a Variant (§5.4.5.6).
each variable of an Input #, and the variable of a Geta variable, not declared as an Object or a class (§5.4.5.10, §5.4.5.12); nor, for Get, as a user-defined type that has one in it.
the data of a Putnot declared as an Object, a class, or a user-defined type that has one in it (§5.4.5.11).
both operands of a NameLet-coercible to String.

Methods

TryEvaluate(StaticEvaluationContext, StatementNode, out ImmutableArray<VBCompileErrorInfo>)

Evaluates the operands of a file statement and checks them.

public static bool TryEvaluate(StaticEvaluationContext context, StatementNode statement, out ImmutableArray<VBCompileErrorInfo> errors)

Parameters

context StaticEvaluationContext

The compile-time context the statement is evaluated in.

statement StatementNode

The statement.

errors ImmutableArray<VBCompileErrorInfo>

Every error found, in operand order. Empty when the statement is valid.

Returns

bool

false when statement is not a file statement, and nothing was evaluated.