2-40 RPL Programming Examples
Program: Comments:
f!g!8(!g!HQ(!h!
26O:!LN<K!s$u|!>TLK!
!
Puts the first position on the stack
and turns on the first image. This
readies the stack and PICT for
the loop.
Q!MBTK!7LK!t!
Starts the loop to generate
horizontal coordinates
indefinitely.
t!3V3!ML4!K#S!
Computes the horizontal
coordinate for the next image.
g!HQ(!H!#E6D:!
Specifies a fixed vertical
coordinate. Puts the two
coordinates in a list.
26O:!LN<K!s$u|!>TLK
Displays the new image, leaving
its coordinates on the stack.
26O:!KL:!s$u|!>TLK!
Turns off the old image,
removing its coordinates from the
stack.
8dH!YB6:!Q!D:<2!
Increments the horizontal
coordinate by 5.
1!
1!
`OWALK K
Stores the program in WALK.
Checksum: # 28684d
Bytes: 250.0
Example: Send the small person out for a walk.
J %WALK%
Press − when you think the walker's tired.