RPL (programming language)

RPL
ParadigmConcatenative (stack-based),[1] structured
Designed byHewlett-Packard
First appeared1984 (1986)
OSHP calculators
Dialects
System RPL, User RPL
Influenced by
RPN, Forth, Lisp[2]
HP 48G calculator, uses RPL

RPL[1] is a handheld calculator operating system and application programming language used on Hewlett-Packard's scientific graphing RPN (Reverse Polish Notation) calculators of the HP 28, 48, 49 and 50 series, but it is also usable on non-RPN calculators, such as the 38, 39 and 40 series. Internally, it was also utilized by the 17B, 18C, 19B and 27S.[7]

RPL is a structured programming language based on RPN, but equally capable of processing algebraic expressions and formulae, implemented as a threaded interpreter.[8] RPL has many similarities to Forth, both languages being stack-based, as well as the list-based LISP. Contrary to previous HP RPN calculators, which had a fixed four-level stack, the dynamic stack used by RPL is only limited by available RAM, with the calculator displaying an error message when running out of memory rather than silently dropping arguments off the stack as in fixed-sized RPN stacks.[9]

RPL originated from HP's Corvallis, Oregon development facility in 1984 as a replacement for the previous practice of implementing the operating systems of calculators in assembly language.[7] The first calculator utilizing it internally was the HP-18C and the first calculator making it available to users was the HP-28C, both from 1986.[10][7] The last pocket calculator supporting RPL, the HP 50g, was discontinued in 2015.[11][12][13] However, multiple emulators that can emulate HP's RPL calculators exist that run on a range of operating systems, and devices, including iOS and Android smartphones. There are also a number of community projects to recreate and extend RPL on newer calculators, like newRPL[14][15] or DB48X,[16][17] which may add features or improve performance.[18]

  1. ^ Cite error: The named reference Joy_2020 was invoked but never defined (see the help page).
  2. ^ Cite error: The named reference HPJ38 was invoked but never defined (see the help page).
  3. ^ Cite error: The named reference HP_4 was invoked but never defined (see the help page).
  4. ^ Cite error: The named reference HP_7 was invoked but never defined (see the help page).
  5. ^ Cite error: The named reference HP_5 was invoked but never defined (see the help page).
  6. ^ Cite error: The named reference HP_6 was invoked but never defined (see the help page).
  7. ^ a b c Cite error: The named reference RPLMAN was invoked but never defined (see the help page).
  8. ^ Cite error: The named reference RPL3 was invoked but never defined (see the help page).
  9. ^ Cite error: The named reference Wessman_2016 was invoked but never defined (see the help page).
  10. ^ Cite error: The named reference Wickes_1987 was invoked but never defined (see the help page).
  11. ^ Cite error: The named reference Kuperus_2015_1 was invoked but never defined (see the help page).
  12. ^ Cite error: The named reference Kuperus_2015_2 was invoked but never defined (see the help page).
  13. ^ Cite error: The named reference Wessman_2015 was invoked but never defined (see the help page).
  14. ^ Cite error: The named reference Lapilli_2014_1 was invoked but never defined (see the help page).
  15. ^ Cite error: The named reference Lapilli_2021 was invoked but never defined (see the help page).
  16. ^ Cite error: The named reference deDinechin_2022 was invoked but never defined (see the help page).
  17. ^ Cite error: The named reference deDinechin_2023 was invoked but never defined (see the help page).
  18. ^ Cite error: The named reference Lapilli_2014_2 was invoked but never defined (see the help page).