RPL Programming Examples 2-27
Program: Comments:
$jmo!:P2<!cd!DBM<!!
=L:!
:;<=!
I=kp!G$o)!kj!utZpI!
4L<KK!
<=4!
Tests if the argument is not a name. If so,
displays an error message and aborts execution.
<=4!
1!
Ends the CASE structure.
Ends the defining procedure.
1!
`OVFYK
Enters the program, then stores it in VFY.
Checksum: # 31403d
Bytes: 139.5
Example: Execute VFY to test the validity of the name argument BEN. (The argument is valid and is simply
returned to the stack.)
OBEN `
J %VFY%
Example: Execute VFY to test the validity of the list argument {BEN JEFF SARAH }. Use the name from the
previous example, then enter the names JEFF and SARAH and convert the three names to a list.
OJEFF `
OSARAH `
3 !° %LIST% %²LIST%
Execute VFY. Since the list contains too many names, the error message is displayed and execution is aborted.
J %VFY%
Converting Procedures from Algebraic to RPN
This section contains a program, "RPN, that converts an algebraic expression into a series (list) of objects in
equivalent RPN order.
Level 1 " Level 1
‘symb’
"
{ objects }