public PrgState(IMyDict <string, int> dict, IMyStack <IStatement> stack, IMyList <int> outList, FileTable <int, FileData> fileTable) { this.dict = dict; this.stack = stack; this.outList = outList; this.fileTable = fileTable; }
public int Eval(IMyDict <string, int> dict) { int vst = st.Eval(dict); int vdr = dr.Eval(dict); if (op == '+') { return(vst + vdr); } if (op == '-') { return(vst - vdr); } if (op == '*') { return(vst * vdr); } else { if (vdr == 0) { throw new DivideByZeroException(); } else { return(vst / vdr); } } }
public int Eval(IMyDict <string, int> dict) { return(dict.GetValue(id)); }
public int Eval(IMyDict <string, int> dict) { return(number); }