RPL (programming language): Difference between revisions

Content deleted Content added
m Robot-assisted disambiguation (you can help!): Forth programming language
added information about the dangers of using SysRPL carelessly, the slowdown in UserRPL programs, and SYSEVAL; FORTH to Forth; added more links; deleted "HP50" series (it's part of the 49 series)
Line 1:
The '''RPL programming language''' (RPL meaning '''[[Reverse Polish notation|Reverse Polish]] [[Lisp programming language|LISP]]''' or, alternatively, '''[[read-only memory|ROM]]-based procedural language''') is a [[calculator|handheld calculator]] system and application [[programming language]] used on [[Hewlett-Packard]]'s engineering graphing [[reverse Polish notation|RPN]] calculators of the [[HP-28]], [[HP-48]], [[HP-49]] and [[HP-5049]] series.
 
RPL is a [[structured programming]] language based on RPN but equally capable of processing [[infix notation|algebraic]] expressions and formulae. RPL has many similarities to [[Forth (programming language)|Forth]], both languages being [[stack-oriented programming language|stack]]-based, and of course the list-based LISPLisp. Contrary to previous HP RPN calculators, which had a fixed four-level stack, the RPL stack used by RPL is only limited by available calculator [[random-access memory|RAM]].
 
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]]. [http://www.hpcalc.org/hp48/docs/programming/rplman.zip] According to a quote by Dr. William Wickes, one of the original RPL developers, "the development team never calls it anything but (the initials) RPL." [http://www.faqs.org/faqs/hp/hp48-faq/part2/]
Line 7:
==Variants==
 
In theThe internal low- to medium-level variant of RPL, called '''System RPL''' (or '''SysRPL'''), it is used on some earlier HP calculators as well as the aforementioned ones, as part of their [[operating system]] implementation language. This variant of RPL is not accessible to the calculator user without the use of external tools. It is possible to cause a serious crash while coding in SysRPL, so caution must be used while using it. The high-level '''User RPL''' (or '''UserRPL''') version of the language is available on said graphing calculators for developing textual as well as graphical application programs. All UserRPL programs are internally represented as SysRPL programs, usingbut use only a safe subset of the available SysRPL commands. The Commandserror availablechecking inthat theis SysRPLa variantpart don'tof containUserRPL thecommands, samehowever, levelmakes ofUserRPL errorprograms checkingnoticeably asslower thosethan availableequivalent inSysRPL programs. The UserRPL, requiringcommand aSYSEVAL greatertells levelthe calculator to process designated parts of carea whileUserRPL program as SysRPL programmingcode.
 
==Control Blocks==
 
Unlike FORTHForth, RPL control blocks are not strictly postfix. TheAlthough there are some notable exceptions, the control block structures appear as they would in a standard infix language. The calculator manages this by allowing the implementation of these blocks to skip ahead in the program stream as necessary.
 
===Conditional Statements===
Line 136:
 
==External links==
*[http://h20000.www2.hp.com/bc/docs/support/SupportManual/c00554621/c00554621.pdf Advanced User's Reference Manual, command reference and RPL guide] – From ''HP''
*[http://www.hpcalc.org/hp49/docs/programming/ RPL Programming Articles] – From ''hpcalc.org''
*[http://www.hpmuseum.org/rpl.htm Article on RPL, with code examples] – From ''The Museum of HP Calculators'' (MoHPC)