Copy the line that works. Under "link", select "jijs", and paste in the code.
Under "action" select "run display".  Return to "link" and select "jijx". The 
code will have displayed and executed. If all is as you wish, select "action" 
and "save as" and name the file. In "link" select "jfile" and you should see 
your new file saved in the list. Any time you want it, select "jfile" and run 
it. Then the code will be executed in "jijx"

Possibly this is too obvious, and not what you are looking for, but it may be 
helpful to someone.  

Linda

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Björn Helgason
Sent: Thursday, October 13, 2011 7:15 AM
To: Programming forum
Subject: Re: [Jprogramming] J Scripts

(((] <. [: p: i.) = [: p: i.) # [: p: i.) 10

If you want to write a script you can use the editor of choice and write
what you want in it.

There are then various ways of getting it executed.

One of the best ways of writing a script (.ijs file) is uSsing the GTK part
and keep the script next to the .ijx and send individual lines over to the
ijx from the ijs as you go along using ctrl+r

You can send many lines over by selecting several lines and using ctrl+e

Once the script is done you can use it basically as if the lines came from
your keeboard except local definitions =. would disappear after execution.

2011/10/13 Björn Helgason <[email protected]>

>  ((10 <. p: i.10) = p: i.10) # p: i.10
>
>
> 2011/10/13 David Vaughan <[email protected]>
>
>> Hi, how do I go about writing a script? How does it differ from writing
>> your code in the browser? For example, say I wanted a script to test the
>> primality of i.10, how would it look?
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
>
>
> --
> Björn Helgason, Verkfræðingur
> Fornustekkum II
> 781 Hornafirði,
> t-póst: [email protected]
> gsm: +3546985532
> twitter: @flugfiskur
> http://groups.google.com/group/J-Programming
>
>
> Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
>
> góður kennari getur stigið á tær án þess að glansinn fari af skónum
>           /|_      .-----------------------------------.
>          ,'  .\  /  | Með léttri lund verður        |
>      ,--'    _,'   | Dagurinn í dag                     |
>     /       /       | Enn betri en gærdagurinn  |
>    (   -.  |        `-----------------------------------'
>    |     ) |         (\_ _/)
>   (`-.  '--.)       (='.'=)   ♖♘♗♕♔♙
>    `. )----'        (")_(") ☃☠
>



-- 
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði,
t-póst: [email protected]
gsm: +3546985532
twitter: @flugfiskur
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
          /|_      .-----------------------------------.
         ,'  .\  /  | Með léttri lund verður        |
     ,--'    _,'   | Dagurinn í dag                     |
    /       /       | Enn betri en gærdagurinn  |
   (   -.  |        `-----------------------------------'
   |     ) |         (\_ _/)
  (`-.  '--.)       (='.'=)   ♖♘♗♕♔♙
   `. )----'        (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to