HP 48gII Advanced User's Reference Manual page 104

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

Advertisement

NAMES is demonstrated in the program VFY.
VFY (Verify Program Argument)
VFY verifies that an argument on the stack is either a name or a list that contains exactly two names.
Level 1
'name'
{ valid list }
{ invalid list }
invalid object
Techniques used in VFY
Utility programs. VFY by itself has little use. However, it can be used with minor modifications by other
!
programs to verify that specific object types are valid arguments.
CASE...END (case structure). VFY uses a case structure to determine if the argument is a list or a name.
!
Structured programming. If the argument is a list, VFY calls NAMES to verify that the list contains exactly
!
two names.
Local variable structure. VFY stores its argument in a local variable so that it can be passed to NAMES if
!
necessary.
Logical function. VFY uses NOT to display an error message.
!
Required Programs
NAMES
NAMES (Check List for Exactly Two Names) verifies that a list argument contains exactly two names.
!
VFY program listing
Program:
«
DUP
DTAG
 argm
«
CASE
argm TYPE 5. SAME
THEN
argm NAMES
END
2-26 RPL Programming Examples
"
"
"
"
{ invalid list } (and error message in status area)
"
invalid object (and error message in status area)
Comments:
Copies the original argument to leave on the
stack.
Removes any tags from the argument for
subsequent testing.
Stores the argument in local variable argm.
Begins the defining procedure.
Begins the case structure.
Tests if the argument is a list.
If so, puts the argument back on the stack and
calls NAMES to verify that the list is valid,
then leaves the CASE structure.
Level 1
'name'
{ valid list }

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents