50G programming question about variables.
I hope this makes sense. I am writing a program (User RPL) that takes a user supplied expression off the stack, say X*Y. Within the program I want to then evaluate this expression for various values of X and Y. So the question is: how do I actually evaluate the expression once it is inside the program. The ways I have been trying essentially involve defining local variables for X and Y, but this is not working. For example (The actual program I am working on is more complicated: it's for propagation of errors):
<< 3 4 -> E X Y <<E EVAL>> >>
will just give me the expression (E) back without evaluating it for X and Y. I am guessing this is an issue with the scope the local variables, but I am not seeing a way around this except to use global variables. Is there a way to accomplish the above program just using local variables?