Post Reply 
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 ?
Find all posts by this user
Quote this message in a reply
01-01-2020, 06:43 AM
Post: #2
RE: Hp50g : "blocking" a variable
(01-01-2020 12:45 AM)Gil Wrote:  On the HP50G

Is there a way to prevent a variable, let's say a, to be incidentally deleted, for example in a program ?

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.
Find all posts by this user
Quote this message in a reply
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.
Find all posts by this user
Quote this message in a reply
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. Smile

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
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.
Find all posts by this user
Quote this message in a reply
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....

@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. Smile

These tools.
Find all posts by this user
Quote this message in a reply
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?

Nice touch adding variable protection to NewRPL, I had missed that until now. Smile

These tools.

Ok, thanks very much Claudio. I've somehow missed these until now, will take a look this weekend.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 




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