|
From: | Dr . Jürgen Sauermann |
Subject: | Re: Incomplete value at Symbol.cc:130 |
Date: | Mon, 14 Dec 2020 17:54:51 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Hi,Fixed in SVN 1377.
I could not resist to experiment.....
)clear
CLEAR WS
A←0
A.A←1
DOMAIN ERROR+
A.A←1
^ ^
)clear
CLEAR WS
A.A←1
A←0 ⍝ Just replacing content of A.
B.B←2
A←B.B ⍝ Generates a trace. - probably should be A.B ←→ 2
Incomplete value at Symbol.cc:130
Addr: 0x1ce1990
Rank: 0
..............
⍝ A structured variable of any depth can be replaced by an assignment to the root variable.Actually no.
A.B.C.D←4
A
.B:
.B.C:
.B.C.D: 4
A←1 ⍝ Consistent with current assignment: replace variable content with RV. No DOMAIN ERROR.
A
1
⍝ Assignment working one time only ..
A.B.C ←1
X.Y.Z ←2
A.B.C←X.Y
A
.B:
.B.C:
.B.C.Z: 2
⍝ should be repeatable:
A.B.C←X.Y
DOMAIN ERROR+
A.B.C←X.Y
^ ^
Proposal:I was thinking of this myself quite a bit. My current thoughts are that overriding a non-leaf can
Allow a non-leaf node to be replaced by a RV. it would then be consistent with how the current assignment works.
The assignment above "A.B.C ← X.Y" is actually an append -> A.B.C.Z rather than a replace, what a "←" normally does.It probably would if the assignment were legal.
I think the assignment should result in A.B.C ← X.Y. ←→ A.B.Z
The append could be covered by the idiom A.B.C. ← X.Y. ←→ A.B.C.Z
.. just my thoughts.
A.B.C ←1
X.Y.Z ←2
K.L.M ←3
A.B.C ← X.Y K.L
DOMAIN ERROR+
A.B.C←X.Y K.L
^ ^
'Idea:'
A.B.C ← X.Y. K.L. ←→ A.B.Z A.B.M
and:
A.B.C. ← X.Y. K.L. ←→ A.B.C.Z A.B.C.M
Basically saying:
Using a trailing dots lets operators work with a structured name element.
A.B. ←→ C
given
A.B.a←1 ⋄ A.B.b←2 ⋄ A.B.c←3
X.Y.x←10 ⋄ X.Y.y←20 ⋄ X.Y.z←30
A.B. could result in structured name elements a b c. That is listing the leaf-node names.
A.B. ← X.Y. could result in structured names A.B.x, A.B.y, A.B.z
Without trailing dots we get the content of a variable.
A.B.C ←→ 1
A.B.a←1
A.B.b←2
A.B.c←3
A
A.B
.a: 1
.b: 2
.c: 3
A.B + 1
DOMAIN ERROR
A.B+1
^ ^
⍝ could be
A.B + 1
2 3 4
Sorry for the lengthy note.
Best Regards
Hans-Peter
[Prev in Thread] | Current Thread | [Next in Thread] |