Table of Contents

Class FanucGoto

Namespace
Hi.NcParsers.Keywords
Assembly
HiMech.dll

Fanuc Custom Macro B GOTO record. Stamped on the host block by FanucGotoSyntax after the control-flow decision has been made; produced earlier by FanucGotoParsingSyntax as a parsing-stage sub-section (Parsing.FanucGoto) carrying the raw captured fields.

Two source forms map to the same shape:

  • GOTO <n> — unconditional jump. Condition is null.
  • IF [<bool-expr>] GOTO <n> — conditional jump. Condition holds the expression text from inside the brackets.

At parsing time N is a raw token from the source — it may be a literal ("100"), a variable reference ("#1"), or a bracketed expression ("#[#2+5]"). VariableEvaluatorSyntax substitutes a resolved literal back into the same field in the Evaluation bundle; FanucGotoSyntax then int.TryParses the final string to produce an int target.

Lifecycle of the condition fields.

public class FanucGoto
Inheritance
FanucGoto
Inherited Members
Extension Methods

Properties

Condition

Raw boolean expression text from inside the IF [...] brackets at Parsing time; substituted to a numeric JsonValue in place by VariableEvaluatorSyntax when the expression evaluates successfully. The original text survives at Formula.FanucGoto.Condition. Null for the unconditional form. Note: not written on the host-level stamp; the gate outcome lives at ConditionEvaluated.

public string Condition { get; set; }

Property Value

string

ConditionEvaluated

Tri-state outcome of evaluating the IF-form's boolean condition, stamped on the host block by FanucGotoSyntax:

  • true — condition met (gate fires).
  • false — condition not met (gate falls through silently).
  • null — evaluator could not produce a finite truth value (vacant variable, parse error, NaN / ±∞), or the host block is the unconditional GOTO form.
The original expression text is preserved at Formula.FanucGoto.Condition by VariableEvaluatorSyntax.
public bool? ConditionEvaluated { get; set; }

Property Value

bool?

Fired

Whether the GOTO actually redirected control flow on this block. False on conditional GOTOs whose condition evaluated to false, on conditional GOTOs whose condition was not evaluable, and on iteration-limit-exceeded blocks. The host block is preserved in either case so diagnostic readers can still see the call.

public bool Fired { get; set; }

Property Value

bool

N

Target sequence-number expression — kept as a string so the in-place evaluator can substitute "#1"“3” before the Evaluation stage parses it as an int.

public string N { get; set; }

Property Value

string

Term

Triggering phrase: “GOTO” for the unconditional form, “IF...GOTO” for the conditional form.

public string Term { get; set; }

Property Value

string