示例#1
0
 public override MMC.Numbers.CNumber Calc(CEnvironment Env)
 {
     if (_Term == null)
     {
         throw new CTermException(_Name + " not initialized!");
     }
     return(_Term.Calc(Env));
 }
示例#2
0
        //------------------------------------------------------------
        public override MMC.Numbers.CNumber Calc(CEnvironment Env)
        {
            if (_Term == null || _Variable == null)
            {
                throw new CTermException(_Name + " not initialized!");
            }

            _Variable.Set(_Term.Calc(Env)); // intialize the variable
            Env.SetVariable(_Variable);     // define or update it in the environment
            return(_Variable.Calc(Env));    // return the value
        }