|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Simple reverse polish interpreter.
Method Summary | |
void |
add()
pop the top two elements, add them and push the result |
void |
divide()
pop the top two elements, divide the former second from top by the former top and push the result |
void |
load(int regno)
Push the numbered register onto the stack |
void |
max()
replace the top two elements by their maximum |
void |
min()
replace the top two stack elements by their minimum |
void |
multiply()
pop the top two elements, multiply them and push the result |
float |
popf()
Pop the stack as a float |
int |
popi()
Pop the stack as an integer |
void |
push(float f)
Push a float onto the stack |
void |
push(int i)
Push an integer onto the stack |
void |
sqrt()
replace the top of stack by its square root |
void |
store(int regno)
Pop the stack and store the result in the numbered register |
void |
subtract()
pop the top two elements, subtract the former top from the former second from top and push the result |
Method Detail |
public void push(int i)
public void push(float f)
public float popf()
public int popi()
public void store(int regno)
public void load(int regno)
public void add()
public void subtract()
public void multiply()
public void divide()
public void min()
public void sqrt()
public void max()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |