public class Ele extends PostfixMathCommand implements LValueI
a=[4,3,2,1];
a[2]; // returns 2
a[2]=5; // a is now [4,5,2,1]
curNumberOfParameters, numberOfParameters
Constructor and Description |
---|
Ele() |
Modifier and Type | Method and Description |
---|---|
void |
run(java.util.Stack s)
Throws an exception because this method should never be called under
normal circumstances.
|
void |
set(EvaluatorI pv,
Node node,
java.lang.Object value)
Performs appropriate action to set an LValue.
|
checkNumberOfParameters, checkStack, getNumberOfParameters, setCurNumberOfParameters
public void set(EvaluatorI pv, Node node, java.lang.Object value) throws ParseException
LValueI
set
in interface LValueI
pv
- a pointer to the evaluator. The pv.eval() method can be used to evaluate the children of the node.node
- The top node for the LValuevalue
- the value obtained by evaluating the right hand side.ParseException
public void run(java.util.Stack s) throws ParseException
PostfixMathCommand
run
in interface PostfixMathCommandI
run
in class PostfixMathCommand
ParseException
http://www.singularsys.com/jep Copyright © 2007 Singular Systems