RPN 28x Calc update - and a routine I needed - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: Not HP Calculators (/forum-7.html) +--- Forum: Not quite HP Calculators - but related (/forum-8.html) +--- Thread: RPN 28x Calc update - and a routine I needed (/thread-16661.html) |
RPN 28x Calc update - and a routine I needed - Gene - 04-15-2021 02:13 PM 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? RE: RPN 28x Calc update - and a routine I needed - Liam Hays - 04-22-2021 11:43 PM 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 Just an idea. -Liam RE: RPN 28x Calc update - and a routine I needed - Gene - 04-23-2021 01:19 AM 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 |