Re: [Jprogramming] Explicit vs tacit with assignment

2019-12-10 Thread 'Jim Russell' via Programming
> On Dec 10, 2019, at 6:59 PM, Jose Mario Quintana > wrote: > > Gilman and Rose's APL: An Interactive Approach > (If my memory is not betraying me.) > One of the nicest complements I ever received (important to me, not to him) was when Al Rose told me once that I should write a book! --

[Jprogramming] if. do. elseif. else. end.

2019-12-10 Thread Ben Gorte
Hi, Despite repeated warnings in JforC I stepped into the trap of using elseif. and else. in the same if.-statement. It took some effort to find that error, because the behaviour is kind of weird: iftest =: 3 : 0 if. y=1 do. echo 'one' elseif. y=2 do. echo 'two' elseif. y=3 do. echo 'three

Re: [Jprogramming] Explicit vs tacit with assignment

2019-12-10 Thread Jose Mario Quintana
> The "(a,a=. ...)" expression reminded me of an upgrade we once did to a > Sharp APL mainframe system where one of the points of interest was how the > upgrade handled what they called "pornographic assignment". I don't > remember the exact example they used but this reminds me of that. I made a

Re: [Jprogramming] Bug?

2019-12-10 Thread David Lambert
Thank you for explaining the sparse array.  I misread the dictionary of j.  Yes, this is fine:    A=:1$.2e6 2e6;0 1;2*0    A=:(<;~1e6) 1:`[`]}A Date: Tue, 10 Dec 2019 21:58:08 +1100 From: Ben Gorte To:programm...@jsoftware.com Subject: Re: [Jprogramming] Bug? Message-ID: Content-Type:

[Jprogramming] 1!:44 (Posix chdir) doesn't report failure in J807

2019-12-10 Thread Lippu Esa
Hello I noticed that 1!:44 (Posix chdir) doesn't report failure in J807. Shouldn't it do that? I have J9 at home, haven't tried that yet. Esa 1!:44 'c:/mydir' 1!:43 '' c:\mydir 1!:44 'c:/fakedir' NB. nonexistent directory. No error message, current working directory stays the same.

Re: [Jprogramming] Bug?

2019-12-10 Thread Ben Gorte
Hi, What is the empty string in the first sentence supposed to be for, no sparse axes? I'm getting: A=:1$.10 10;'' 77 (<3 4) } A scheck i type |system error Is that right or wrong? Without the ;'' everything is fine, even with very large arrays: A=:1$.1e8 1e8 ]A=:77 (<3 4) } A 3 4 │ 77