[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Structured Variable Assignment - )more
From: |
Hans-Peter Sorge |
Subject: |
Structured Variable Assignment - )more |
Date: |
Wed, 16 Dec 2020 13:16:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 |
Hi Jürgen,
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.
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
- Structured Variable Assignment - )more,
Hans-Peter Sorge <=