Jump to content

Talk:RPL (programming language)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ponjo~enwiki (talk | contribs) at 01:01, 12 July 2008 (Four level stack?: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

RPL acronym

Is Reverse Polish LISP truly a synonym for Reverse Polish Language, or is RP LISP a separate thing that uses the concept of RP Language within the context of the LISP language? If the latter, Reverse Polish LISP should have its own page and not be a redirect, or should have a separate paragraph within this article. -- Jeff Q 02:20, 3 May 2004 (UTC)[reply]

Thanks for the comment; the article is now updated to reflect this. In fact the term Reverse Polish language is unheard-of, since it might just as well mean FORTH... --Wernher 03:18, 3 May 2004 (UTC)[reply]
Thank you for clearing that up. I made a few minor changes to conform to standard English punctuation practices. Please revert if I have inadvertently changed the meaning of your excellent description. And thanks for providing this interesting article! -- Jeff Q 06:43, 3 May 2004 (UTC)[reply]

Postfix conditional structures

There is a simple postfix-based way to implement if/then/else structures, which RPN purists would prefer.

The following example uses the IFT ("if-then") function to pop an object from the bottom of the stack, and if it is equal to 1, replace it with "One":

« 1 == "One" IFT »

The following example uses the IFTE ("if-then-else") function to pop an object from the bottom of the stack, and if it is equal to 1, replace it with "One", otherwise replace it with "Not one":

« 1 == "One" "Not" IFTE »

These structures can of course be nested. Both of the following examples pop an object from the bottom of the stack, and replace it with "One", "Less", or "More", depending on whether it is equal to, less than, or greater than 1.

«
  DUP 1 ==
  « DROP "One" »
  « 1 < "Less" "More" IFTE »
  IFTE
»

« -> x
  «
    x 1 ==
    "One"
    « x 1 < "Less" "More" IFTE »
    IFTE
  »
»

Tony.

I added a section for IFT/IFTE, using some of the content you've placed here. --MatthewMastracci 19:27, 12 May 2005 (UTC)[reply]

REALITY

The recently-added content about the REALITY Programming Language is a different subject altogether. It should be moved to a new article, and a disambiguation page created. Rwxrwxrwx 11:11, 10 July 2007 (UTC)[reply]

Four level stack?

"Contrary to previous HP RPN calculators, which had a fixed four-level stack, the stack used by RPL is only limited by available calculator RAM."

I have a 48gx and it is not stack limited. A quick test gave me more than 50 items in the stack. I assume it is limited only by memory.

I don't know if other RPN calculators are stack limited. Ponjo (talk) 01:01, 12 July 2008 (UTC)[reply]