Class FanucWhileDo
Fanuc Custom Macro B WHILE/END bounded-loop record. Stamped on the
host block by
FanucWhileDoSyntax after the
control-flow decision has been made; produced earlier by
FanucWhileDoParsingSyntax as a
parsing-stage sub-section (Parsing.FanucWhileDo) carrying the
raw captured fields.
Two phrases map to the same shape, distinguished by Term:
WHILE [<bool-expr>] DO <m>— loop entry. Condition holds the expression text from inside the brackets at parsing time; substituted to a numeric JsonValue by VariableEvaluatorSyntax in place. ConditionEvaluated carries the host-level truthy outcome at stamp time.END <m>— loop terminator. Carries no condition; unconditionally reverse-jumps to the matching WHILE block on every execution (re-evaluation of the entry condition is the WHILE block's responsibility).
LoopId is the spec-named "identification number for
nesting" (the m in DO m / END m). Nested loops
must use distinct LoopIds; matching is by exact value. Same-LoopId
nesting is spec-undefined and not given special handling here.
Active loop frames are carried block-to-block via the top-level
WhileFrames JSON section (a JsonObject
keyed by LoopId-as-string, each entry recording the
BeginLineNo of the WHILE block that opened that frame).
Carried by ModalCarrySyntax as part
of its Logic tracked
keys (mutated in Evaluation, must reach Logic-stage consumers and
downstream blocks unchanged).
public class FanucWhileDo
- Inheritance
-
FanucWhileDo
- Inherited Members
- Extension Methods
Properties
Condition
Raw boolean expression text from inside the WHILE's [...]
brackets at Parsing time; substituted to a numeric
JsonValue in place by
VariableEvaluatorSyntax when the
expression evaluates successfully. The original text survives at
Formula.FanucWhileDo.Condition. Null on the END phrase.
Note: not written on the host-level stamp; the gate outcome lives at
ConditionEvaluated.
public string Condition { get; set; }
Property Value
ConditionEvaluated
Tri-state outcome of evaluating the WHILE's boolean condition, stamped on the host block by FanucWhileDoSyntax:
true— condition met (body executes; loop continues).false— condition not met (loop exits; forward-jump past matching END).null— evaluator could not produce a finite truth value (vacant variable, parse error, NaN / ±∞); loop exits defensively and emitsFanucWhileDo--ConditionNotEvaluated.
Formula.FanucWhileDo.Condition
by VariableEvaluatorSyntax.
public bool? ConditionEvaluated { get; set; }
Property Value
- bool?
LoopId
The m identifier from DO m / END m — the
spec-named “identification number for nesting”. Nested loops use
distinct LoopIds (1–3 typical); WHILE and END pair by exact match.
public int LoopId { get; set; }
Property Value
Term
Triggering phrase: “WHILE...DO” for the loop entry form,
“END” for the loop terminator.
public string Term { get; set; }