RPL (programming language): Difference between revisions

Content deleted Content added
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5) (Whoop whoop pull up - 18507
m WP:ADOPTYPO boolean -> Boolean
 
(One intermediate revision by one other user 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
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":