RPL (programming language): Difference between revisions

Content deleted Content added
refs
m WP:ADOPTYPO boolean -> Boolean
 
(8 intermediate revisions by 8 users not shown)
Line 3:
{{Use dmy dates|date=April 2019|cs1-dates=y}}
{{Use list-defined references|date=October 2023}}
 
{{Infobox programming language
| name = RPL
| logo =
| paradigm = [[stack-orientedConcatenative programming language|StackConcatenative]], ([[structured programming|structured]], [[concatenativestack-oriented programming language|concatenativestack-based]]),<ref name="Joy_2020"/> partially [[object-orientedstructured programming|structured]]<ref name="Urroz_2000"/><ref name="RPL_2023"/><ref name="RPL_2003"/>
| year = 1984<!-- development start --> (1986<!-- first products using it -->)
| designer = [[Hewlett-Packard]]
Line 23 ⟶ 24:
| file_ext =
}}
[[File:HP48G.jpg | thumb | 220x124px | right | HP 48G calculator, uses RPL ]]
 
'''RPL'''{{ref|rpl_acronym_note_1}} is a [[calculator|handheld calculator]] operating system and application [[programming language]] used on [[Hewlett-Packard]]'s scientific graphing [[Reverse Polish Notation|RPN]] (Reverse Polish Notation) calculators of the [[HP-28 series|HP 28]], [[HP 48 series|48]], [[HP 49 series|49]] and [[HP 50g|50]] series, but it is also usable on non-RPN calculators, such as the [[HP 38G|38]], [[HP 39/40 series|39 and 40]] series. Internally, it was also utilized by the [[HP-17B|17B]], [[HP-18C|18C]], [[HP-19B|19B]] and [[HP-27S|27S]].<ref name="RPLMAN"/>
 
Line 53 ⟶ 56:
Postfix conditional testing may be accomplished by using the IFT ("if-then") and IFTE ("if-then-else") functions.
 
IFT and IFTE pop two or three commands off the stack, respectively. The topmost value is evaluated as a booleanBoolean and, if true, the second topmost value is pushed back on the stack. IFTE allows a third "else" value that will be pushed back on the stack if the booleanBoolean is false.
 
The following example uses the IFT function to pop an object from the bottom of the stack and, if it is equal to 1, replaces it with "One":
Line 163 ⟶ 166:
 
==References==
{{Reflistreflist|refs=
<ref name="Joy_2020">{{cite web |url=https://www.hpmuseum.org/forum/showthread.php?mode=linear&tid=15509&pid=135732 |title=The Joy of Programming? |publisher=Museum of HP Calculators |date=2020 |archive-url=https://web.archive.org/web/20211203131528/https://www.hpmuseum.org/forum/showthread.php?mode=linear&tid=15509&pid=135732 |archive-date=2021-12-03}}</ref>
<ref name="Urroz_2000">{{cite book |author-first=Gilberto E. |author-last=Urroz |title=Programming the HP 49 G Calculator in User RPL Language |date=2000 |url=https://h30434.www3.hp.com/psg/attachments/psg/palm-webossoftware/252122/1/hp49g04.pdf |archive-url=https://web.archive.org/web/20221031143355/https://h30434.www3.hp.com/psg/attachments/psg/palm-webossoftware/252122/1/hp49g04.pdf |archive-date=2022-10-31}}</ref>
<ref name="RPL_2023">{{cite web |url=https://www.hpmuseum.org/rpl.htm |title=RPL |publisher=Museum of HP Calculators |archive-url=https://web.archive.org/web/20230820203818/https://www.hpmuseum.org/rpl.htm |archive-date=2023-08-20}}</ref>
<ref name="RPL_2003">{{cite web |url=https://archived.hpcalc.org/museumforum/thread-35921.html |title=RPN/RPL — What? |date=2003 |publisher=Museum of HP Calculators |archive-url=https://web.archive.org/web/20230820204017/https://archived.hpcalc.org/museumforum/thread-35921.html |archive-date=2023-08-20}}</ref>
<ref name="HP_4">http://h41268.www4.hp.com/live/index_e.aspx?qid=20709&jumpid=va_r11363_us/en/any/tsg/pl_ot_ob_ds_pd/calculatoremulators_cc/dt{{dead link|date=April 2018 |bot=InternetArchiveBot|fix-attempted=yes}}</ref>
<ref name="HP_7">http://www.calculatrices-hp.com/index.php?page=emulateurs<!-- https://web.archive.org/web/20170917223308/http://www.calculatrices-hp.com/index.php?page=emulateurs --></ref>
<ref name="HP_5">{{cite web |url=http://www.hpmuseum.org/forum/thread-4405-post-39600.html |title=Emulator of HP 50g with #2.16 ROM}}</ref>
<ref name="HP_6">http://www.calculatrices-hp.com/uploads/emulateurs/HP50gVirtualCalculatorSetup_3_1_30.zip<!-- https://web.archive.org/web/20170917095533/http://www.calculatrices-hp.com/uploads/emulateurs/HP50gVirtualCalculatorSetup_3_1_30.zip --></ref>
<ref name="HPJ38">{{cite journal |title=Computation for Handheld Calculators |author-last=Patton |author-first=Charles M. |journal=[[Hewlett-Packard Journal]] |publisher=[[Hewlett-Packard Company]] |___location=Palo Alto, California, USA |date=August 1987 |volume=38 |issue=8 |pages=21–25 |url=http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1987-08.pdf |access-date=2015-09-12 |archive-date=2011-12-06 |archive-url=https://web.archive.org/web/20111206105511/http://www.hpl.hp.com/hpjournal/pdfs/IssuePDFs/1987-08.pdf |url-status=dead }}</ref>
<ref name="Wickes_1988">{{cite conference |title=RPL: A Mathematical<!-- also seen as: "Mathematics". Check actual publication's cover. --> Control Language |author-last=Wickes |author-first=William C. |editor-first=Lawrence P. |editor-last=Forsely |date=1988-10-01 |orig-date=14–18 June 1988 |conference=Proceedings of the 1988 Rochester Forth Conference: Programming Environments |volume=8 |publisher=Institute for Applied Forth Research, Inc., [[University of Rochester]] |___location=Rochester, New York, USA |isbn=978-0-91459308-9 |oclc=839704944 <!-- |doiurl=https://dl.acm.org/doi/abs/10.5555/534949--> |pages=27–32 |quote=Several existing operating systems and languages were considered, but none could meet all of the design objectives. A new system was therefore developed, which merges the threaded interpretation of [[Forth (programming language)|Forth]] with the functional approach of [[Lisp (programming language)|Lisp]]. The resulting operating system, known unofficially as RPL (for Reverse-Polish Lisp), made its first public appearance in June of 1986 in the [[HP-18C]] Business Consultant calculator.}} (NB. This title is often cited as "RPL: A Mathematics Control Language". An excerpt is available at: [https://web.archive.org/web/20230328115142/https://www.hpcalc.org/details/1743][https://web.archive.org/web/20220419184811/https://www.hpcalc.org/hp48/docs/programming/rplman.zip])</ref>
<ref name="Schoorl_2000">{{cite web |title=HP48 Frequently Asked Questions List |author-first=André |author-last=Schoorl |date=2000-04-04 |pages=69 <!-- date=2015 |editor-first=Eric |editor-last=Rechlin | --> |publisher=HP Calculator Archive |orig-date=1997 |url=http://www.hpcalc.org/hp48/docs/faq/48faq-pdf.zip |access-date=2015-09-12}}</ref>
<ref name="FAQ48">{{cite web |title=I've heard the names RPL, Saturn, STAR, GL etc... What are they? - RPL |work=FAQ: 2 of 4 - Hardware, Programs, and Programming |id=8.1. |publisher=comp.sys.hp48 |date=2000-04-14 |version=4.62 |url=http://www.faqs.org/faqs/hp/hp48-faq/part2/ |access-date=2015-09-12}}</ref>