for calculators - see an HP calculator with reverse Polish notation

RPN, An introduction to Reverse Polish Notation

http://h41111.www4.hp.com/calculators/uk/en/articles/rpn.html

leave J alone! Like APL it can be read left to right or right to left as desired and developed as desired

Donna
[EMAIL PROTECTED]




On 27-Jun-08, at 1:58 PM, Jack Andrews wrote:

hi guys,

i was pondering the benefits pros and cons of a left to right
notation.  common calculators go left to right - 1 + 2 * 3 is 9.  is
the fact that common calculators operate this way due to "common
sense" or an innate intuitiveness?

so ordinary J:

     q=. 2 3 5 7 9

   1 + 2 * q
5 7 11 15 19


then a left to right J could be:

      2 3 5 7 9 =. q

   q * 2 + 1
5 7 11 15 19


=. q may be the most offputting here, but this is just how a common
calculator works -- the "M+" key.

ta, jack
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to