Class PowerOperation

java.lang.Object
org.kigalisim.lang.operation.PowerOperation
All Implemented Interfaces:
Operation

public class PowerOperation extends Object implements Operation
Calculation that raises one number to the power of another.
  • Constructor Details

    • PowerOperation

      public PowerOperation(Operation left, Operation right)
      Create a new PowerOperation.
      Parameters:
      left - The left operand of the power operation (base).
      right - The right operand of the power (power).
  • Method Details

    • execute

      public void execute(PushDownMachine machine)
      Execute the calculation and leave the result at the top of the stack.
      Specified by:
      execute in interface Operation
      Parameters:
      machine - The machine in which to execute the calculation if needed.