[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] dynamic function not referencing global?
From: |
Christian Robert |
Subject: |
Re: [Bug-apl] dynamic function not referencing global? |
Date: |
Tue, 25 Oct 2016 14:46:26 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
More info. I was not sure I've been clear enough in my answer,
)clear
CLEAR WS
)wsid Deck
WAS CLEAR WS
deck←''
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
⍝deck←deck,"?" "?" "?" "?" ⍝knights
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck←deck,"?" "?" "?" "?"
deck ← ⊖13 4 ⍴ deck
hand←(∈deck)[13?52]
DISPLAYhand←{,(⍪hand),' '}
)vars
DISPLAYhand deck hand
⍴DISPLAYhand
26
DISPLAYhand
🂢 🃈 🃃 🂷 🃞 🃙 🃝 🂫 🃋 🃕 🃒 🃂 🂧
)erase DISPLAYhand
∇DISPLAYhand
[1] ,(⍪hand),' '
[2] ∇
DISPLAYhand
🂢 🃈 🃃 🂷 🃞 🃙 🃝 🂫 🃋 🃕 🃒 🃂 🂧
hand←(∈deck)[13?52]
DISPLAYhand
🂤 🂺 🂾 🂷 🂪 🂱 🂳 🂸 🃚 🃅 🂻 🂲 🂭
There is no way to create a niladic Lambda (eg: without arguments)
Xtian.
On 2016-10-25 12:54, address@hidden wrote:
Hi bug-apl,
Why does DISPLAYhand not use the new value of hand on the second call?
deck←''
deck←deck,"🂢" "🂲" "🃂" "🃒"
deck←deck,"🂣" "🂳" "🃃" "🃓"
deck←deck,"🂤" "🂴" "🃄" "🃔"
deck←deck,"🂥" "🂵" "🃅" "🃕"
deck←deck,"🂦" "🂶" "🃆" "🃖"
deck←deck,"🂧" "🂷" "🃇" "🃗"
deck←deck,"🂨" "🂸" "🃈" "🃘"
deck←deck,"🂩" "🂹" "🃉" "🃙"
deck←deck,"🂪" "🂺" "🃊" "🃚"
deck←deck,"🂫" "🂻" "🃋" "🃛"
⍝deck←deck,"🂬" "🂼" "🃌" "🃜" ⍝knights
deck←deck,"🂭" "🂽" "🃍" "🃝"
deck←deck,"🂮" "🂾" "🃎" "🃞"
deck←deck,"🂡" "🂱" "🃁" "🃑"
deck ← ⊖13 4 ⍴ deck
hand←(∈deck)[13?52]
DISPLAYhand←{,(⍪hand),' '}
DISPLAYhand
🂢 🃈 🃃 🂷 🃞 🃙 🃝 🂫 🃋 🃕 🃒 🃂 🂧
hand←(∈deck)[13?52]
DISPLAYhand
🂢 🃈 🃃 🂷 🃞 🃙 🃝 🂫 🃋 🃕 🃒 🃂 🂧
hand
🂤🂺🂾🂷🂪🂱🂳🂸🃚🃅🂻🂲🂭
Thanks,
Alex
Re: [Bug-apl] dynamic function not referencing global?,
Christian Robert <=