Exemple #1
0
 public override void Execute(ICpu cpu)
 {
     bool result = false; //pessimistic default
     // Convert to string instead of cast in case the identifier is stored
     // as an encapsulated StringValue, preventing an unboxing collision.
     string ident = Convert.ToString(cpu.PopStack());
     if (ident != null && cpu.IdentifierExistsInScope(ident))
     {
         result = true;
     }
     cpu.PushStack(result);
 }
Exemple #2
0
 public override void Execute(ICpu cpu)
 {
     bool result = false; //pessimistic default
     string ident = cpu.PopStack() as string;
     if (ident != null && cpu.IdentifierExistsInScope(ident))
     {
         result = true;
     }
     cpu.PushStack(result);
 }