Hp50g : "blocking" a variable
|
01-01-2020, 12:45 AM
Post: #1
|
|||
|
|||
Hp50g : "blocking" a variable
On the HP50G
Is there a way to prevent a variable, let's say a, to be incidentally deleted, for example in a program ? |
|||
01-01-2020, 06:43 AM
Post: #2
|
|||
|
|||
RE: Hp50g : "blocking" a variable
(01-01-2020 12:45 AM)Gil Wrote: On the HP50G Only by storing it in port 2. You can't prevent the user from erasing it, but you can recover it using Flash tools if that happens. Another solution is to make it NULL-named, you won't be able to purge it but then you can't recall it by normal procedures either. On the other hand, newRPL does have that feature, you can lock/unlock any variable, trying to STO anything throws an error saying that the variable is read-only. |
|||
01-01-2020, 10:40 AM
Post: #3
|
|||
|
|||
RE: Hp50g : "blocking" a variable
You could store the value, say
7, in :2:SEVEN & store << :2:SEVEN EVAL >> in SEVEN in the HOME directory. Actuating SEVEN places 7 on the stack & if SEVEN is deleted :2:SEVEN is unaffected. |
|||
01-01-2020, 04:19 PM
Post: #4
|
|||
|
|||
RE: Hp50g : "blocking" a variable
(01-01-2020 06:43 AM)Claudio L. Wrote: ... You can't prevent the user from erasing it, but you can recover it using Flash tools if that happens.... @Claudio - Which Flash tools are these, I don't recall reading about these? Nice touch adding variable protection to NewRPL, I had missed that until now. --Bob Prosperi |
|||
01-01-2020, 06:19 PM
Post: #5
|
|||
|
|||
RE: Hp50g : "blocking" a variable
RPL resolves a variable by looking upward through the chain of directories until it finds a match. So if variable 'A' is being erased from the current directory then create it in the parent directory, still called 'A'.
Executing 'A' PURGE in the child directory will not generate an error but it also won't delete 'A' from the parent. |
|||
01-02-2020, 02:27 PM
Post: #6
|
|||
|
|||
RE: Hp50g : "blocking" a variable
(01-01-2020 04:19 PM)rprosperi Wrote:(01-01-2020 06:43 AM)Claudio L. Wrote: ... You can't prevent the user from erasing it, but you can recover it using Flash tools if that happens.... These tools. |
|||
01-03-2020, 12:28 AM
Post: #7
|
|||
|
|||
RE: Hp50g : "blocking" a variable
(01-02-2020 02:27 PM)Claudio L. Wrote:(01-01-2020 04:19 PM)rprosperi Wrote: @Claudio - Which Flash tools are these, I don't recall reading about these? Ok, thanks very much Claudio. I've somehow missed these until now, will take a look this weekend. --Bob Prosperi |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)