EasyManua.ls Logo

HP 48GII

HP 48GII
653 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1
RPL Programming 1-1
1.RPL Programming
If you've used a calculator or computer before, you're probably familiar with the idea of programs. Generally
speaking, a program is something that gets the calculator or computer to do certain tasks for you -- more than a
built-in command might do. In the
hp49g+/hp48gII, a program is an object that does the same thing.
Understanding Programming
An hp49g+/hp48gII program is an object with « » delimiters containing a sequence of numbers, commands,
and other objects you want to execute automatically to perform a task.
For example, a program that takes a number from the stack, finds its factorial, and divides the result by 2 would
look like this: « ! 2 / » or
«
!
2
/
»
The Contents of a Program
As mentioned above, a program contains a sequence of objects. As each object is processed in a program, the
action depends on the type of object, as summarized below.
Actions for Certain Objects in Programs
Object Action
Command
Executed.
Number Put on the stack.
Algebraic or `Algebraic` Algebraic put on the stack.
String Put on the stack.
List Put on the stack.
Program Put on the stack.
Global name (quoted) Put on the stack.
Global name (unquoted)
! Program executed.
! Name evaluated.
! Directory becomes current.
! Other object put on the stack.
Local name (quoted) Put on the stack.
Local name (unquoted) Contents put on the stack
As you can see from this table, most types of objects are simply put on the stack — but built-in commands and
programs called by name cause execution. The following examples show the results of executing programs
containing different sequences of objects.

Table of Contents

Other manuals for HP 48GII

Related product manuals