Hi - I don't know if I can answer all your questions, but here's a couple of
hints.  The reasons you don't need "execute" (".) is that the interpreter is
reading your lines as though they are entered in a session.  So, you could
have run
   1 2 3 4 5 + 3
by itself and gotten the same result.

I suspect the indenting is the three-space prompt that the J interpreter
uses.

Good luck,

Devon

On Tue, Aug 18, 2009 at 10:54 AM, Charles Turner <[email protected]>wrote:

> Hi-
>
> I know my question is fraught with ignorance about J, bit I wonder if
> someone might point me in a useful direction.
>
> I'm beginning to learn J on the Macintosh, and am also trying to build
> a TextMate bundle for it at the same time. I've been exploring J's
> scripting features, but haven't been getting the results I would
> expect, based on my J readings.
>
> I have the following file, "execute.ijs":
>
> > #! /usr/bin/env /usr/local/bin/jc
> > stdout stdin
>
> .and I have the following data file, "data.txt":
>
> > a =: 1 2 3 4 5 + 3
> > a
>
> ...and I execute and get the following result in the bash shell:
>
> > spinoza:~/Desktop$ ./execute.ijs <data.txt
> >       4 5 6 7 8
> >    spinoza:~/Desktop$
>
> So my questions are:
>
> 1) I would have thought that I needed to use ". in order to have J
> evaluate data.txt
> 2) I would have though that jconsole would stay running, and that I
> would have needed "exit ''" to quit jconsole.
> 3) The echoed result and the ensuing bash prompt are indented. Is this
> an artifact of jconsole's interpreter, or do I have something else
> (not good) going on here?
>
> Many thanks, Charles Turner
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to