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 !
4 posts
• Page 1 of 1
Are conjunctions unassignable?
opp←{⍺ ⍺⍺ ⍵⍵ ⍵}
tfuu←opp
SYNTAX ERROR
tfuu←opp
∧
⍝ How do I assign opp?
tfuu←opp
SYNTAX ERROR
tfuu←opp
∧
⍝ How do I assign opp?
- ArrayMac227
- Posts: 62
- Joined: Sat Sep 12, 2015 1:40 pm
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←⍤
∧
- Roger|Dyalog
- Posts: 238
- Joined: Thu Jul 28, 2011 10:53 am
Re: Are conjunctions unassignable?
but not reassigned as Randy discoveredRoger|Dyalog wrote:... a dyadic d-operator may be named using ←. ...
Randy wrote:... tfuu←opp ...
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
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
-
Phil Last - Posts: 628
- Joined: Thu Jun 18, 2009 6:29 pm
- Location: Wessex
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group