sealed class Tinman.Core.Cx.Statements.CxStatementFor

A statement that loops over a body statement zero or more times:

for (int i = 0; i < n; i++)
  a += i;

for (; a < n;)

ICxStatementContainer.Statement returns the body statement of the loop.
ICxVariableContainer.Variable returns the loop variable definition.

Public / Constructors


public constructor CxStatementFor → (4)

statement in : CxStatement

See ICxStatementContainer.Statement.

condition in : CxExpression

See condition.

variable opt : CxVariable = null

See ICxVariableContainer.Variable.

increment opt : IBagConst<CxExpression> = null

The list of post-iteration expressions or null for an empty list. See Increment.

Creates a new instance of CxStatementFor.

Public / Attributes


public attribute Condition → (get)

value : CxExpression

The loop condition.

Returns the loop condition.


public attribute Increment → (get)

value : IVectorConst<CxExpression>

The list of post-iteration expressions.

Returns the expressions to evaluate after each loop iteration.