Yes - it's easy to see how you might make this mistake.  The foreign
conjunction immediately preceding (1!:12) is (1!:11) - indexed read - which
does require 2 numbers in the second box.  Also, if you're coming from
something lik a C background, you are used to specifying the lengths of
things explicitly, as in the prototype for file write:

fwrite(void *ptr, size_t size, size_t nbr, FILE *stream);

Hermann - it looks like you may be working with large files, so you may be
interested in this description of dealing with files larger than 2 GB:
http://www.jsoftware.com/jwiki/Scripts/Working%20with%20Big%20Files .
Unfortunately, it's specific to Windows as it uses an API for working with
large files.

On Wed, Dec 16, 2009 at 9:35 AM, bill lam <bbill....@gmail.com> wrote:

> I guess the length error referred to the right argument of 1!:12 that
> it expected a count of 2 item.
> a 1!:12 f,(sg*60)
> or
> a 1!:12 f;(sg*60)
>
> mer, 16 Dec 2009, Hermann Wandelt skribis:
> > Yes Bill, 'a' is a character string of 60 bytes.
> >
> > a=. 10 15 15 10 10":tpr=.sg,(sg*#Tin),(#Tin),(sg*#Tdi),#Tdi
> >
> > a
> > '         0              0           9679         0        49'
> >
> >
> > ______________________
> >
> > Hermann Wandelt
> >
> > Schustersweid 6
> >
> > 47665 Sonsbeck
> >
> > E-Mail: bay...@online.de
> >
> > -----Ursprüngliche Nachricht-----
> > Von: programming-boun...@jsoftware.com
> > [mailto:programming-boun...@jsoftware.com] Im Auftrag von bill lam
> > Gesendet: Mittwoch, 16. Dezember 2009 15:03
> > An: programming@jsoftware.com
> > Betreff: Re: [Jprogramming] Indexed Write(length) Error
> >
> > What is 'a'?  Is it a rank-1 character array of 60 bytes?
> >
> > mer, 16 Dec 2009, Hermann Wandelt skribis:
> > > I'm not very experienced in using Foreign Conjunctions. Therefore I
> can't
> > > see what the length error causes.
> > >
> > >
> > >
> > > NB.---------------Test No. 1
> > >
> >
> ----------------------------------------------------------------------------
> > > --------------------------------------------------
> > >
> > > sg
> > >
> > > 0
> > >
> > > (10 15 15 10 10":tpr=.sg,(sg*#Tin),(#Tin),(sg*#Tdi),#Tdi)
> > > (1!:12)('d:\xldlm\dlm_daten\dlmnIndex.txt';(sg*60),60)
> > >
> > > |length error
> > >
> > > |   (10 15 15 10 10":tpr=.sg,(sg*#Tin),(#Tin),(sg*#Tdi),#Tdi)  (1!:12)
> > > ('d:\xldlm\dlm_daten\dlmnIndex.txt';(sg*60),60)
> > >
> > >
> > > NB. -------------Test No. 2
> > >
> >
> ----------------------------------------------------------------------------
> > [---=| Quote block shrinked by t-prot: 23 lines snipped |=---]
> > >
> > >    a (1!:12) f,(sg*60),60
> > >
> > > |length error
> > >
> > > |   a    (1!:12)f,(sg*60),60
> > >
> > >
> > > NB.
> > >
> >
> ----------------------------------------------------------------------------
> > [---=| TOFU protection by t-prot: 20 lines snipped |=---]
>
> --
> regards,
> ====================================================
> GPG key 1024D/4434BAB3 2008-08-24
> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
> ----------------------------------------------------------------------
> 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