There are no verbs "open" and "close" for files. You have to use (1!:21) to
open and (!:22) to close. (1!:21) creates a file handle to use in reads and
writes instead of the file name. (1!@22) uses the handle created by
(1!:21). Faster if you do lots of reads and writes to a file. The nice
thing about using the file name for reads and writes is that the open and
close are implied. So you don't have to worry about closing files when you
are through with them.


On Mon, May 27, 2013 at 9:08 AM, Murray Eisenberg <[email protected]>wrote:

> So how does one find out about the existence of "open" and where is it
> documented?
>
> On 26 May 2013 12:38:28 -0400, Dan Bron <[email protected]> wrote:
>
> > Any valid argument to load is also a valid argument to open.  So try
>  open'files'  . Often, scripts contain embedded comments which illuminate
> their purpose and the intended use of the names they define.
> >
> > On May 26, 2013, at 11:59 AM, Murray Eisenberg <[email protected]>
> wrote:
> >
> >> In J801, where is files.ijs and how does one get its documentation?
> >>
> >> I did the following:
> >>
> >>  load 'files'    N.B. no error results
> >>  load 'scriptdoc'
> >>  scriptdoc 'files'
> >> -1
> >>
> >> I searched for files.ijs but didn't find it. I looked on the j wiki at
> http://www.jsoftware.com/jwiki/JAL/j701but didn't find anything about it
> there.
> >>
> >> Is there some documentation somewhere on such basic defined functions
> as in files.ijs? Where? (And how is a user supposed to find it???)
>
> ---
> Murray Eisenberg                                    [email protected]
> Mathematics & Statistics Dept.
> Lederle Graduate Research Tower            phone 413 549-1020 (H)
> University of Massachusetts                               413 545-2838 (W)
> 710 North Pleasant Street                         fax   413 545-1801
> Amherst, MA 01003-9305
>
>
>
>
>
> ----------------------------------------------------------------------
> 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