Beispiel #1
0
        public double FuncResult(string fs, TempDataCollection tdcl, params string[] nums)
        {
            double result = 0;

            if (fs != null)
            {
                PushToShow("有括号求值");
                FuncCal    fc   = new FuncCal();
                FuncData   fd   = (FuncData)tdc.GetData(fs).GetCalData();
                FuncString funs = new  FuncString(fs, fd.GetExpValue(), fd.GetParamers());
                fc.SetFuncString(funs);
                fc.DealFuncstring(nums);
                result = fc.GetResult();
                PushToShow("结果:" + fc.GetResult());
                if (fc.IsWrong())
                {
                    PushToShow("出错了!" + fc.ErrorMessage());
                }
            }
            return(result);
        }
Beispiel #2
0
 public static void SetTdc(TempDataCollection ptdc)
 {
     tdc = ptdc;
 }