Verifying Program Arguments; Names (Check List For Exactly Two Names) - HP 48gII Advanced User's Reference Manual

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

Advertisement

Program:
UNTIL 'm' EVAL 0 ==
END
IF 1 FS?C
THEN "0" +
WHILE i 'k' EVAL
- 0 Š
REPEAT "0" +
1 'k' STO+
END
END
»
" base" b +
n SWAP + TAG f STOF
»
»
`OnBASE K
Checksum: # 54850d
Bytes:
433
Example: Convert 1000
1000 `23 J %NBASE%

Verifying Program Arguments

The two utility programs in this section verify that the argument to a program is the correct object type.
NAMES verifies that a list argument contains exactly two names.
!
VFY verifies that the argument is either a name or a list containing exactly two names. It calls NAMES if the
!
argument is a list.
You can modify these utilities to verify other object types and object content.

NAMES (Check List for Exactly Two Names)

If the argument for a program is a list (as determined by VFY), NAMES verifies that the list contains exactly
two names. If the list does not contain exactly two names, an error message appears in the status area and
program execution is aborted.
2-24 RPL Programming Examples
to base 23.
10
Comments:
Repeat the DO...UNTIL loop until m = 0
(i.e. all decimal value have been
accounted for).
Is flag 1 set? Clear the flag after the test.
Then add a placeholding zero to the result
string.
Begin WHILE...REPEAT loop to
determine if additional placeholding zeros
are needed.
Loop repeats as long as i k.
Add an additional placeholding zero and
increment k before repeating the test-
clause.
End the WHILE...REPEAT...END loop,
the IF...THEN...END structure, and the
inner local variable structure.
End the outermost
IF...THEN...ELSE...END structure and
create the label string and tag the result
string using the original arguments.
Also restore original flag settings.
Stores the program in nBASE.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents