Esempio n. 1
0
  public void run(Stack inStack) throws ParseException {
    checkStack(inStack); // check the stack

    Object param2 = inStack.pop();
    Object param1 = inStack.pop();

    inStack.push(power(param1, param2));
  }
Esempio n. 2
0
 public void run(Stack inStack) throws ParseException {
   checkStack(inStack); // check the stack
   Object param = inStack.pop();
   inStack.push(cos(param)); // push the result on the inStack
   return;
 }