opp←{⍺ ⍺⍺ ⍵⍵ ⍵}
tfuu←opp
SYNTAX ERROR
tfuu←opp
∧
⍝ How do I assign opp?
Are conjunctions unassignable?
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !
-
- Posts: 238
- Joined: Thu Jul 28, 2011 10:53 am
Re: Are conjunctions unassignable?
In current Dyalog APL, a dyadic d-operator may be named using ←. No other dyadic operator may not so named. For example,
rank←⍤
SYNTAX ERROR
rank←⍤
∧
Re: Are conjunctions unassignable?
but not reassigned as Randy discoveredRoger|Dyalog wrote:... a dyadic d-operator may be named using ←. ...
Randy wrote:... tfuu←opp ...
Re: Are conjunctions unassignable?
You can't create a reference to it
)cleareither thither ↑ or thence ↓
clear ws
opp←{⍺←⊢ ⋄ (⍺ ⍺⍺ ⍵)⍵⍵ ⍵}
)ns s
#.s
s.op←opp
SYNTAX ERROR
s.op←opp
∧
)cs sbut you can call it directly with its fully qualified name
#.s
op←#.opp
SYNTAX ERROR
op←#.opp
^
2 + #.opp × 3or you can create a cover that does that for you
15
op←{⍺←⊢ ⋄ ⍺ ⍺⍺ #.opp ⍵⍵ ⍵}
2 + op × 3
15