APL2 code no longer works

2022-03-21 Thread Blake McBride
Greetings, I wrote the following APL1 code a long time ago. ∇ [0] r←d Parse v [1] ⍝ Convert vector v into a matrix breaking at delimiter d [2] r←(((0≠⍴v)×⍴r),⌈/r)⍴(,r∘.≥⍳⌈/r←¯1+(r,1+⍴v)-0,r←r/⍳⍴v)\(~r←v∈d)/v←,v ∇ It worked in 1981 and it works now. I believe at some point someone o

Re: APL2 code no longer works

2022-03-21 Thread Hans-Peter Sorge
Hi, Parse2 works for me. Albeit a rather simple test. What was your data you parsed?? To explain: r←(1↑d),(1↑d),v   ⍝⍝ add 2 time the delimiter in front of vector. If d is a vector, take the first element. If d is a matrix, fail. ⍝ normally use a different name than the return var. Just improve

Re: APL2 code no longer works

2022-03-21 Thread Blake McBride
On Mon, Mar 21, 2022 at 3:34 PM Hans-Peter Sorge < hanspeterso...@netscape.net> wrote: > Hi, > > Parse2 works for me. Albeit a rather simple test. > What was your data you parsed?? > ',' Parse 'One,Two,Three,Four' One Two Three Four ',' Parse2 'One,Two,Three,Four' One Two Three Four