Table of Contents

Struct ForLoopState

Namespace
RDCore.SDK.Runtime.Shared
Assembly
RDCore.SDK.dll

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

Counter Symbol

The bound-variable-expression symbol the loop counts through.

ControlExpression ExpressionNode

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.

End VBTypedValue

The loop's end-value, evaluated once and never re-evaluated.

Step VBTypedValue

The 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

ExpressionNode

Counter

The bound-variable-expression symbol the loop counts through.

public Symbol Counter { get; init; }

Property Value

Symbol

End

The loop's end-value, evaluated once and never re-evaluated.

public VBTypedValue End { get; init; }

Property Value

VBTypedValue

Step

The loop's step-increment, evaluated once and never re-evaluated.

public VBTypedValue Step { get; init; }

Property Value

VBTypedValue