Structured Variables - a DB use case

2020-12-16 Thread Hans-Peter Sorge
Hi I have created a DB example exploring structured variables: ⍝ setting the connect parameters MY_DB.DB_CONNECT.DB_NAME←'db_name' MY_DB.DB_CONNECT.DB_HOST←'172.0.0.1' MY_DB.DB_CONNECT.DB_USER←'me' MY_DB.DB_CONNECT.DB_PASSWD←'t0tal53(rt' ⍝ Do the connect. Use root name only. BD_CONNECT.DB_HNDL←

Structured Variable Assignment - )more

2020-12-16 Thread Hans-Peter Sorge
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,

On assignment using structured variables - was Incomplete value at Symbol.cc:130

2020-12-16 Thread Hans-Peter Sorge
Hi Jürgen, thank for your detailed information. The simple sequence of ...   A←1   B←2   A←B ... will (obviously) not change the variable name of A.   A 2 The alike assignments in structured variables behave differe

Syntax error in function using structured name assignment

2020-12-16 Thread Hans-Peter Sorge
Hi, just an experiment to see what can be done ... Works like a charm - mostly :-) ⍝ --- an arbitrary function.   ∇example[⎕]     ∇ [0]   Z←example name_struct [1]   Z← name_struct [2]   Z.N ← 'new' [3]   ⎕EX 'Z.K'     ∇ ⍝ - some data   A.B.C.D ← 14    

Structured variables - inconsistency in depth expression.

2020-12-16 Thread Hans-Peter Sorge
Hi, there is some inconsistency in depth reporting:   ≡ U.V.W.X.Y.Z←0 0   ≡ U 6   ≡ U.V.W.X.Y.Z←,0 1   ≡ U 6 ⍝ should be 7   ??   ≡ U.V.W.X.Y.Z←⊂,0 2   ≡ U 7 ⍝ should be 8   ?? Q: Does depth on structured variables not have a different meaning? This takes