Rpl Programming; Understanding Programming; The Contents Of A Program - HP 48gII Advanced User's Reference Manual

Graphing calculator
Hide thumbs Also See for 48gII:
Table of Contents

Advertisement

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 / »
«
!
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.
Command
Number
Algebraic or `Algebraic`
String
List
Program
Global name (quoted)
Global name (unquoted)
Local name (quoted)
Local name (unquoted)
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.
or
Actions for Certain Objects in Programs
Object
Action
Executed.
Put on the stack.
Algebraic put on the stack.
Put on the stack.
Put on the stack.
Put on the stack.
Put on the stack.
Program executed.
!
Name evaluated.
!
Directory becomes current.
!
Other object put on the stack.
!
Put on the stack.
Contents put on the stack
1
RPL Programming 1-1

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents