bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug? Cannot )erase free-standing '⍺', '⍵' vars created by parse erro


From: Dr . Jürgen Sauermann
Subject: Re: Bug? Cannot )erase free-standing '⍺', '⍵' vars created by parse error
Date: Sun, 7 Mar 2021 15:25:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi,

a good source is pages 354 ff in the IBM language reference manual:

http://www.ibm.com/downloads/cas/ZOKMYKOY


On 3/7/21 1:58 AM, Russtopia wrote:
Hi, thank you. Another list watcher had also replied to me that this is likely the issue. I will study the topic of )SI so I better understand how this pending state works!

-Russ


On Sat, 6 Mar 2021 at 11:07, Dr. Jürgen Sauermann <mail@jürgen-sauermann.de> wrote:
Hi Russ,

after the RANK ERROR the lambda is pending and its local
variables including ⍺) are held by the )SI stack:

      {⍺{⍺[⍵;]}¨⍳≢⍵}⍨(3 4⍴⍳12)
RANK ERROR
λ1[1]  λ←⍺ λ1¨⍳≢⍵
         ^    ^
      ⍺
1  2  3  4
5  6  7  8
9 10 11 12

      )SI
λ1[1]


Use → or )SI to clear the )SI entry:

      →
      ⍺
VALUE ERROR
      ⍺
      ^

Best Regards,
Jürgen



On 3/6/21 6:21 PM, Russtopia wrote:
It is expected that parsing errors can result in 'free' ⍺,⍵ variables in the workspace (outside of any lambda), and that they do not show up in )vars and cannot be deleted short of a )clear?

In a new, clear GNU APL session:

      {(⊂⍺){⍺[⍵;]}¨⍳≢⍵}⍨(3 4⍴⍳12)
 1 2 3 4  5 6 7 8  9 10 11 12
      ⍺
VALUE ERROR
      ⍺
      ^
      ⍵
VALUE ERROR
      ⍵
      ^
      ⍝⍝ As expected...
      {⍺{⍺[⍵;]}¨⍳≢⍵}⍨(3 4⍴⍳12)
RANK ERROR
λ1[1]  λ←⍺ λ1¨⍳≢⍵
         ^    ^
      ⍺
1  2  3  4
5  6  7  8
9 10 11 12
      ⍵
1  2  3  4
5  6  7  8
9 10 11 12
      )erase '⍵'
NOT ERASED: '⍵'
      )erase '⍺'
NOT ERASED: '⍺'
      ⎕ex '⍺'
0
      ⍺
1  2  3  4
5  6  7  8
9 10 11 12
      )vars
      )clear
CLEAR WS
      ⍺
VALUE ERROR
      ⍺
      ^




reply via email to

[Prev in Thread] Current Thread [Next in Thread]