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);
     }
 }
Exemple #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();
 }
Exemple #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);
     }
 }
Exemple #4
0
 public override void execute()
 {
     variables[variableName] = expr.evaluate().Trim();
 }