# Index - HP 48gII Advanced User's Reference Manual

Graphing calculator.

Index-oriented commands. Many array commands either establish the size of an array in rows and
!
columns or manipulate individual elements by their row and column indices. These commands expect these
row and column indices to be real number pairs collected in lists. For example, {3 4} RANM will generate
a random integer matrix having 3 rows and 4 columns. Since these commands can normally use lists as
arguments, they cannot perform parallel processing, except by using DOLIST.
Program control commands. Program control structures and commands do no perform parallel
!
processing and cannot be forced to do so. However, programs containing these structures can be made to
parallel process by using DOLIST. For example,
{1 2 3 4 5 6} 1 « IF DUP 3 ‰ THEN DROP END " DOLIST returns {3 4 5 6}.
Group 3: commands that sometimes work with parallel processing
Graphics commands that can take pixel coordinates as arguments expect those coordinates to be presented as
!
two-element lists of binary integers. Since these commands can normally use lists as arguments, they cannot
parallel process, except by using DOLIST.
For the two-argument graphics commands (BOX, LINE, TLINE), if either argument is not a list (a complex
!
number, for example), then the commands will parallel process, taking the list argument to be multiple
complex number coordinates. For example, (0,0) {(1,1) (3,2)} LINE will draw two lines —
between (0,0) and (1,1) and between (0,0) and (3,2).
On HP 48S and HP 48SX calculators, the + command has been used to append lists or to append elements to
!
lists. Thus {1 2 3} 4 + returns {1 2 3 4}. With the advent of parallel processing in the hp 48g and
This has several ramifications:
To add two lists in parallel, you must do one of the following:
!
"
"
Assign the ADD command to a user-defined key.
"
User programs must be written using ADD instead of + if the program is to be able to perform direct parallel
!
processing, or written with + and applied to their arguments by using DOLIST. For example, programs such
as «  x 'x+2' " will produce list concatenation when x is a list rather than parallel addition, unless
rewritten as «  x 'x ADD 2' "
Algebraic expressions capable of calculating with variables containing lists (including those intended to
!
become user-defined functions) cannot be created in RPN syntax since using ADD to add two symbolic
arguments concatenates the arguments with + rather than with ADD. For example,
'X' DUP 2 ^ SWAP 4 * ADD 'F(X)' SWAP = produces 'F(X)=X^2+4*X' rather than
Group 5: Commands that set modes / states
Commands that store values in system-specific locations so as to control certain modes and machine states can
generally be used to parallel process data. The problem is that each successive parameter in the list cancels the
setting established by the previous parameter. For example, {1 2 3 4 5} FIX is effectively the same as
5 FIX.
Group 6: One-argument, one-result commands
These commands are the easiest to use with parallel processing. Simply provide the command with a list of
arguments instead of the expected single argument. Some examples:
{1 -2 3 -4} ABS returns {1 2 3 4}
F - 2 Parallel Processing With Lists  