예제 #1
0
 public int Eval(MyIDictionary <string, int> tbl)
 {
     if (!tbl.isDefined(id))
     {
         MyException ex = new MyException("Variable does not exist!");
         throw ex;
     }
     return(tbl.lookup(id));
 }
예제 #2
0
 public override int eval(MyIDictionary <string, int> tbl)
 {
     try
     {
         return(tbl.lookup(id));
     }
     catch (MyException ex)
     {
         throw new MyException("" + ex);
     }
 }
예제 #3
0
 public override int eval(MyIDictionary <string, int> dict)
 {
     try { return(dict.lookup(val)); }
     catch (DictExceptions e) { throw new StmtExceptions(e); }
 }