Table of Contents

Interface IVariableLookup

Namespace
Hi.NcParsers.EvaluationSyntaxs.Evaluation
Assembly
HiMech.dll

Resolves a Custom Macro B variable reference to its current numeric value, or null for vacant (Fanuc <vacant>) and out-of-scope alike.

The key is the raw source token — Fanuc "#124", Heidenhain "Q1", Siemens "R1" — so the interface itself is brand-agnostic. Implementations are typically narrow (one per id range / per brand prefix) and parse the prefix locally; chain them at the call site by trying each in priority order until one returns a non-null value.

A returned null is treated by NcExpressionEvaluator as vacant and surfaces as a Variable--Vacant failure when the value is consumed in arithmetic context.

public interface IVariableLookup
Extension Methods

Methods

Get(string)

Returns the value of the variable identified by key (e.g. "#124"), or null if vacant or unknown to this lookup.

double? Get(string key)

Parameters

key string

Returns

double?