Exemplo n.º 1
0
        public override string EvalEquation(MoccaEquation codeBase)
        {
            string op = "";

            switch (codeBase.op)
            {
            case "ADD":
                op = "+";
                break;

            case "SUB":
                op = "-";
                break;

            case "MUL":
                op = "*";
                break;

            case "DIV":
                op = "/";
                break;

            case "MOD":
                op = "%";
                break;
            }

            return(codeBase.a.ToString() + " " + op + " " + codeBase.b.ToString());
        }
Exemplo n.º 2
0
 public abstract string EvalEquation(MoccaEquation codeBase);