namespace TestMathExp
{
class Program
{
static void Main(string[] args)
{
var calc = new Calculator();
calc.SetVar("a", 1);
calc.SetVar("b", 2);
Console.WriteLine("t0: " + calc.Calc("311"));
Console.WriteLine("t1: " + calc.Calc("31+2-5*0"));
Console.WriteLine("t2: " + calc.Calc("31+(2-5)*0"));
Console.WriteLine("t3: " + calc.Calc("3.99*0.9*6.83*1.15"));
Console.WriteLine("t4: " + calc.Calc("a+b"));
Console.ReadKey();
Console.WriteLine("**********");
}
}
}

Last edited Nov 26, 2013 at 2:29 AM by cxchen84xi, version 1