// ( value variable -- ) public override void Execute(Interpreter interp) { VariableItem variable = (VariableItem)interp.StackPop(); StackItem value = interp.StackPop(); variable.VariableValue = value; }
public bool TryFindVariable(string text, out Word result) { bool found = false; if (variables.ContainsKey(text)) { VariableItem variableItem = variables[text]; result = new PushStackItemWord(text, variableItem); found = true; } else { result = null; found = false; } return(found); }
// ( variable -- ) public override void Execute(Interpreter interp) { VariableItem variable = (VariableItem)interp.StackPop(); interp.StackPush(variable.VariableValue); }