Exemplo n.º 1
0
 public override void execute()
 {
     if (conditionOperator == "=")
     {
         if (test1.evaluate() == test2.evaluate())
         {
             isTrue.execute();
         }
         else
         {
             isFalse.execute();
         }
     }
     else if (conditionOperator == "<>" || conditionOperator == "><")
     {
         if (test1.evaluate().Trim() != test2.evaluate().Trim())
         {
             isTrue.execute();
         }
         else
         {
             isFalse.execute();
         }
     }
     else
     {
         System.Diagnostics.Debug.WriteLine("neznamy operator " + conditionOperator);
     }
 }
Exemplo n.º 2
0
 public AssignString(string name, ExpressionStr expr, Dictionary <string, string> variables)
 {
     variableName            = name.Trim();
     this.expr               = expr;
     this.variables          = variables;
     variables[variableName] = expr.evaluate().Trim();
 }
Exemplo n.º 3
0
 public override void execute()
 {
     if (conditionOperator == "=")
     {
         while (argument1.evaluate() == argument2.evaluate())
         {
             body.execute();
         }
     }
     else if (conditionOperator == "<>" || conditionOperator == "><")
     {
         while (argument1.evaluate().Trim() != argument2.evaluate().Trim())
         {
             body.execute();
         }
     }
     else
     {
         System.Diagnostics.Debug.WriteLine("neznamy operator " + conditionOperator);
     }
 }
Exemplo n.º 4
0
 public override void execute()
 {
     variables[variableName] = expr.evaluate().Trim();
 }