Re: [Jprogramming] Translating BASIC into J

2012-11-27 Thread Bo Jacoby
Thank you very much, June and Raul! The blank lines in the file should not be there. (They were invisible until the mail was sent.) A line number ends when a nondigit character is encountered, and line numbers may be padded with zeroes to the right, so ' AMEN' and '0 AMEN' behaves the same way.

Re: [Jprogramming] Translating BASIC into J

2012-11-27 Thread 김창준
Hi Bo, Firstly on the database file: I suppose there is no blank line in between the lines of the file. I suppose AMEN at the end was actually, 0 AMEN, instead. Now a quick and dirty version -- notice that this doesn't fully implement the basic code exactly, but you'll get the key idea. 'key

Re: [Jprogramming] Translating BASIC into J

2012-11-27 Thread 김창준
On Wed, Nov 28, 2012 at 5:47 AM, Raul Miller wrote: > I am having difficulty with this because I do not understand that > dialect of basic well enough. > > For example, what does >OPEN "CREDO" FOR INPUT AS 1 > do? > > Is it specifically always opening a file named "credo"? > Yes. http://en.

Re: [Jprogramming] JHS meets MathJax

2012-11-27 Thread bill lam
I have never a user case of using J COM server. but I test registrer j701 j.dll (which I have renamed to j.dll-off) under wine and it seemed ok. bill@debian:bin32(master)$ wine regsvr32.exe j.dll-off Application tried to create a window, but no driver could be loaded. Make sure that your X server

Re: [Jprogramming] Translating BASIC into J

2012-11-27 Thread Raul Miller
I am having difficulty with this because I do not understand that dialect of basic well enough. For example, what does OPEN "CREDO" FOR INPUT AS 1 do? Is it specifically always opening a file named "credo"? Does the input statement on line 1 read from this file? Which part of the string does

Re: [Jprogramming] JHS meets MathJax

2012-11-27 Thread John Baker
I have changed my blog post and added a footnote noting Bill's observation that 7.01 can function as a COM client. If anyone has run 7.01 as a COM server please let us know. jdb On Sun, Nov 25, 2012 at 11:22 AM, bill lam wrote: > I have never used J as a COM server, but apparently the j.dl

Re: [Jprogramming] Fwd: Boxing by columns

2012-11-27 Thread Ric Sherlock
Note that you can skip the issue with the padded zeros by processing through to a regular structure at the first "1 ([: +/ ~.)"1 |: ar or using atop +/@~."1 |: ar On Tue, Nov 27, 2012 at 12:56 PM, Linda Alvord wrote: > (+/"1) 0~: (~.)"1 |: --

Re: [Jprogramming] count iterations

2012-11-27 Thread Brian Schott
Does this suggest an idea? Whilea=: 2 : 'u^:v^:a:' topswop Whilea (1 ~: {.) 2 4 1 3 2 4 1 3 4 2 1 3 3 1 2 4 2 1 3 4 1 2 3 4 -- (B=) -- For information about J forums see http://www.jsoftware.com/forums.htm

Re: [Jprogramming] count iterations

2012-11-27 Thread Linda Alvord
I'm learning a lot too. f=: 13 :'(|.({.y){.y),({.y)}.y' f ([: |. {. {. ]) , {. }. ] swops2=: f^:a: swops2 2 3 5 1 4 2 3 5 1 4 3 2 5 1 4 5 2 3 1 4 4 1 3 2 5 2 3 1 4 5 3 2 1 4 5 1 2 3 4 5 Tackling all the permutations look daunting. Linda -Original Message- From: program