NewRPL: RPN with brackets (A * B) + (C / D) => (A B *) (C D /) - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: Not HP Calculators ( /forum-7.html)+--- Forum: Not quite HP Calculators - but related ( /forum-8.html)+--- Thread: NewRPL: RPN with brackets (A * B) + (C / D) => (A B *) (C D /) ( /thread-10513.html) |

NewRPL: RPN with brackets (A * B) + (C / D) => (A B *) (C D /) - compsystems - 04-15-2018 03:03 PM
Hello, one of the difficulties of reading a program code written in RPL and expressions, written Reverse Polish Notation (RPN) is knowing how to identify the scope of the expressions, that is, from where they begin and end. One option is to add brackets () and to differentiate the ASCII symbols 28 and 29, use the hexadecimal values 276a 276b ❪❫ (A * B) + (C / D) => (A B *) (C D /) + => ❪A B *❫ ❪C D /❫ Good idea? RE: NewRPL: RPN with brackets (A * B) + (C / D) => (A B *) (C D /) - The Shadow - 04-15-2018 03:23 PM
Seems like a good chunk of extra typing for little return. I don't personally find RPN hard to read, at any rate on the scale of your examples. RE: NewRPL: RPN with brackets (A * B) + (C / D) => (A B *) (C D /) - compsystems - 04-15-2018 04:14 PM
(04-15-2018 03:48 PM)moonbeam Wrote: Isn't RPN/RPL's raison d'être the very absence of brackets? is a NEW RPL reinvented, easier to use, codify, more powerful, more intuitive, auto-documented =] pretty-printing in RPL is not possible because the expression has been separated (A B *) (C D /) RE: NewRPL: RPN with brackets (A * B) + (C / D) => (A B *) (C D /) - compsystems - 04-17-2018 02:25 AM
the idea of tabulation is a way of grouping and visualizing parts of expressions, the converter has an option [STACK] that performs something similar, please try it. RPN online converter http://www.hpmuseum.org/forum/thread-4032.html RE: NewRPL: RPN with brackets (A * B) + (C / D) => (A B *) (C D /) - Vtile - 04-26-2018 03:32 PM
I solely use expressions like 'A+B*(X-y)' when that sort of thing is needed (even then these days I prefer to compose the algebraic expression in RPL stack) and in program code I do use: << A B C + - <CR> TemperaryVAR SWAP DUP * / <CR> >> The only problem above is that the basic interpreter in the stock 50g will mix it up when you push it to the stack. I think We should remember that in RPL opposite to RPN we do deal with OBJECTS which can be anything, but the objects are interacted with reverse polish logic. So: 2(=1 object) A(=1 object) STO (=command) 3(=1 object) B(=1 object) STO (=command) 'A+B' (=1 object, composed from 3 (sub)objects or from 4 (sub)objects if you count the out most container as an object, which I think would be the most correct way) "..." "STRING" + (object1 + object2) >>>> "...STRING" <<'A' 'B' 'C' {} + + +>> (1 object composed from 7 (sub)objects (+1 obj.)) {'A' 'B' 'C'} (1 object) |