|
From: | Dr . Jürgen Sauermann |
Subject: | Re: Structured Variable Assignment - )more |
Date: | Thu, 17 Dec 2020 11:46:49 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Hi Jürgen,For the reasons explained above. When you erase an entire tree, then there is
Concerning the erasure of a variable, other language have such functionality too.
Like "unset VAR" or "VAR=", by that ignoring variable content.
Even ⎕EX does not care.
Protecting names is done by )PCOPY. or ⍫, though locking a function renders it unreadable.
And as I mentioned, when using structured variables the sequence
A.B.C←1
A ← 2
will ⎕EX 'A.B'. The name-tree is not being protected:
A
2
To protect variables against erasure/changes, functionality should be implemented on a common level.Is that ⎕PV something existing or did you make it up? I suppose my explanation in a previous email
eg. Quad Protect Variable -> ⎕PV
⎕PV 'name'
0
⍝ name is unprotected.
1 ⎕PV 'name'
⎕EX 'name'
0
⍝ name is protected against erasure
2 ⎕PV 'name'
name ← 'new data'
PROTECTED
name ← 'new data'
^
⍝ name is protected against modification
0 ⎕PV 'name'
⍝ unprotect name
I have to apologize for my endless train of ideas.
Working 45 years with APL, I have 45 years worth of ideas on my mind :-)
Best Regards
hans-Peter
[Prev in Thread] | Current Thread | [Next in Thread] |