(((] <. [: 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 using 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

Reply via email to