Struct ForLoopState
The hidden per-activation state a For loop's opener stashes for its own closer to read back
(MS-VBAL §5.4.2.3) — the end/step values are evaluated once, ahead of the loop, and
read again on every Next without re-evaluating their source expressions.
public readonly record struct ForLoopState : IEquatable<ForLoopState>
- Implements
- Inherited Members
Constructors
ForLoopState(Symbol, ExpressionNode, VBTypedValue, VBTypedValue)
The hidden per-activation state a For loop's opener stashes for its own closer to read back
(MS-VBAL §5.4.2.3) — the end/step values are evaluated once, ahead of the loop, and
read again on every Next without re-evaluating their source expressions.
public ForLoopState(Symbol Counter, ExpressionNode ControlExpression, VBTypedValue End, VBTypedValue Step)
Parameters
CounterSymbolThe
bound-variable-expressionsymbol the loop counts through.ControlExpressionExpressionNodeThe counter's own expression node, reused as the location-bearing node for every arithmetic/ let-assignment step a
Nextperforms — never a synthetic stand-in.EndVBTypedValueThe loop's
end-value, evaluated once and never re-evaluated.StepVBTypedValueThe loop's
step-increment, evaluated once and never re-evaluated.
Properties
ControlExpression
The counter's own expression node, reused as the location-bearing node for every arithmetic/
let-assignment step a Next performs — never a synthetic stand-in.
public ExpressionNode ControlExpression { get; init; }
Property Value
Counter
The bound-variable-expression symbol the loop counts through.
public Symbol Counter { get; init; }
Property Value
End
The loop's end-value, evaluated once and never re-evaluated.
public VBTypedValue End { get; init; }
Property Value
Step
The loop's step-increment, evaluated once and never re-evaluated.
public VBTypedValue Step { get; init; }