RPN 28x Calc update - and a routine I needed
04-15-2021, 02:13 PM (This post was last modified: 04-15-2021 02:21 PM by Gene.)
Post: #1
 Gene Moderator Posts: 1,198 Joined: Dec 2013
RPN 28x Calc update - and a routine I needed
RPN 28x Calc is an HP-28C / HP-28S emulator that I run on an iOS device.

The developer has added a USER screen where you provide a list of names (variables or procedures) to the MENU command and it creates a button for them on the USER screen. USER does not work like it does on the HP-28 by bringing up a set of soft menu labels. Wish it did, but...

So my struggle has been - what are the stored variables / procedures on the machine so I can delete the ones I don't want?

I wrote this. Please feel from to cut it by 80% of its size. haha.

<< VARS DUP SIZE 1 SWAP FOR I I GET LAST DROP NEXT DROP >>

This procedure returns the list of USER entries by the VAR command. It then keeps the list on the stack level 2 and puts the size of the list in level 1.

Before the FOR loop, the list of VARS is in level 3, a 1 is in level 2 and the SIZE of the list is in level 1.

The FOR loop gets the I entry from the list, then pulls the list back to the stack and loops until it has grabbed the SIZE-th item out of the list. It then exits and drops the list.

So if VARS contains { TST GAME BOZO }, then the procedure leaves:

3: 'TST'
2: 'GAME'
1: 'BOZO'

on the stack, allowing me to grab the item I want to delete, etc.

Other approaches to do the same thing?
04-22-2021, 11:43 PM
Post: #2
 Liam Hays Junior Member Posts: 42 Joined: Jan 2021
RE: RPN 28x Calc update - and a routine I needed
Hi,

Sorry to add a response only () a week after; April is a busy month.

It's a shame that the developer didn't try for one-to-one accurate emulation. I'm no RPL genius (and I've only used a 48, not a 28), but it looks like you're just exploding a list onto the stack. I think you could do that with

Code:
VARS OBJ\-> (HP 48 syntax), or  VARS LIST\-> (HP 28 syntax, I think)

Just an idea.

-Liam
04-23-2021, 01:19 AM
Post: #3
 Gene Moderator Posts: 1,198 Joined: Dec 2013
RE: RPN 28x Calc update - and a routine I needed
Yep, that will work... problem for me was the LIST-> command was no where to be found in the emulator. Had to type it in as LIST then -> and then go back and delete the space that was put in there.

ty
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)