EasyManuals Logo

HP 48GII User Manual

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
Page #104 background imageLoading...
Page #104 background image
2-26 RPL Programming Examples
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 " Level 1
'name'
"
'name'
{ valid list }
"
{ valid list }
{ invalid list }
"
{ invalid list } (and error message in status area)
invalid object
"
invalid object (and error message in status area)
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: Comments:
"!
452!
Copies the original argument to leave on the
stack.
4:B>!
Removes any tags from the argument for
subsequent testing.
#!$jmo!
Stores the argument in local variable argm.
"!
OBD<!
$jmo!:P2<!Qd!DBM<!
:;<=!
$jmo!=BM<D!
<=4!
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.

Table of Contents

Other manuals for HP 48GII

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 48GII and is the answer not in the manual?

HP 48GII Specifications

General IconGeneral
Battery typeCR2032
TypeScientific
Form factorPocket
Weight and Dimensions IconWeight and Dimensions
Weight220 g
Dimensions (WxDxH)184 x 87 x 23.5 mm

Related product manuals