Re: Question about RPL equality tests Message #2 Posted by Vieira, Luiz C. (Brazil) on 14 Oct 2001, 9:17 p.m., in response to message #1 by Chris Randle (Lincoln, UK)
O.K., let's do it: think of 2 'X' STO and 3 'Y' STO. The sequence
'X+Y' 5 SAME returns 0 (false) and 'X+Y' 5 == EVAL returns 1 (true).
The rule is == always evaluate both arguments, and SAME doesn't. Also, SAME is a command and cannot be used in an algebraic (e.g. 'SAME(X,Y)' or 'X SAME Y' don't exist) but == can, as it is a function.
There are some other diferences when using == applied to other types of objects. By now, does it clear? If not, post another question.
Best regards.
|