Table of Contents

Class MidStatementStaticSemantics

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

MS-VBAL §5.4.3.5 the Mid, MidB, Mid$ and MidB$ statements (static semantics).

public static class MidStatementStaticSemantics
Inheritance
MidStatementStaticSemantics
Inherited Members

Remarks

"The declared type of <string-argument> MUST be String or Variant", and the target is a bound-variable-expression, so it is a variable. The statement's other operands are not given a rule of their own, but they are used as the statement's runtime semantics uses them: the position and the length as Long (the declared type of the parameters of the Mid function), and the value as a String, so each has to be Let-coercible to that (MS-VBAL §5.5.1.1).

Methods

Evaluate(StaticEvaluationContext, MidStatementNode)

Evaluates the operands of a Mid statement and checks them.

public static ImmutableArray<VBCompileErrorInfo> Evaluate(StaticEvaluationContext context, MidStatementNode mid)

Parameters

context StaticEvaluationContext

The compile-time context the statement is evaluated in.

mid MidStatementNode

The statement.

Returns

ImmutableArray<VBCompileErrorInfo>

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