Post Reply 
Conversion: Algebraic - Polish - Reverse Polish - LISP ?
11-02-2024, 01:39 PM
Post: #7
RE: Conversion: Algebraic - Polish - Reverse Polish - LISP ?
(11-02-2024 12:57 PM)John Keith Wrote:  One question: Is there a reason that the first loop is a FOR loop rather than a START loop? I don't see a reference to i anywhere in the program.

I didn't put too much effort into it. I just single stepped through the original →RPN program and noticed that I had to put everything into a list using: 1 →LIST.
But this made the following check for list obsolete: TYPE 5 ≠. Therefore I dropped that.
And then I had to insert a SWAP so that the operator in the local variable f is added to the head of the list.
Therefore you'd have to ask the developer of the TEACH command.

Thinking about optimizations we might also combine both loops into a single one.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Conversion: Algebraic - Polish - Reverse Polish - LISP ? - Thomas Klemm - 11-02-2024 01:39 PM



User(s) browsing this thread: 1 Guest(s)