Post Reply 
HP 50g - Purge current variable message
03-13-2023, 10:11 AM
Post: #1
HP 50g - Purge current variable message
I came across an odd issue recently - when calling a program from a test harness that calls the program under test repeatedly with different numbers, a choose box would pop up with the message 'Purge current variable?'. Choosing yes would continue normally but choosing cancel would abort execution with the message 'Mode switch cancelled'.

In debug mode, I could see that this was triggered by an 'IDIV2' instruction.

Does anyone know what the message means? What is meant by a 'mode switch' and why does IDIV2 trigger it? I tried a search but only found references to the CAS and interactions with the variable 'X'. I did, in fact, have a variable 'X' in the test harness that stored the current number but since I am not using any CAS features, I am not sure if it is the same reason.

This is just for my own understanding being new to RPL and the 50g. I worked around the issue by changing IDIV2 to "/ IP".

Sudhir
Find all posts by this user
Quote this message in a reply
03-13-2023, 04:54 PM
Post: #2
RE: HP 50g - Purge current variable message
The reason is that IDIV2 is a CAS command. I tend to avoid using X as a variable name when possible.
Find all posts by this user
Quote this message in a reply
03-13-2023, 10:28 PM
Post: #3
RE: HP 50g - Purge current variable message
Note also that other commands may use CAS commands internally; e.g. I believe IQUOT & IREMAINDER both use IDIV2.

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
Post Reply 




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