I should add 2 small points here:

1.The one line correction.
My intent was to keep things simple, also retaining the focus on the ease
of using numbered licales.  And it worked for me on my windows pc and my
Ipad.  That is why I did not add more code or warnings about its
limitations
But I like the little bit of J magic dust in the line creating the array of
numeric locales with the use of @.   And I would add that anyone
contemplating the use of numeric locales should not have problems with that
bit of code.

2. Correcting the wiki.
Following the instructions found in the wiki I did request permission to
make the change. I indicated the page I intended to correct and  that my
change had been suggested by Henry Rich. After a week, having received no
reply, I posted the simple correction.

Le jeu. 19 mai 2022, à 12 h 15, Raul Miller <rauldmil...@gmail.com> a
écrit :

>
> https://code.jsoftware.com/wiki/Vocabulary/Locales#An_example_using_explicit_and_object_locatives
>
> I made some further changes.
>
> First, to use cocreate for the name of each numbered locale, and
>
> Second I indented the code slightly, and replaced smoutput with echo,
> for (in my opinion) improved readability.
>
> (Using cocreate and discarding its result did not actually work.)
>
> Thanks,
>
> --
> Raul
>
> On Thu, May 19, 2022 at 12:01 PM Devon McCormick <devon...@gmail.com>
> wrote:
> >
> > Which is here - https://code.jsoftware.com/wiki/Vocabulary/Locales -
> and I
> > made the change without checking the code.
> >
> >
> > On Thu, May 19, 2022 at 11:55 AM Devon McCormick <devon...@gmail.com>
> wrote:
> >
> > > You can get the required authorization by asking for it.
> > > If you do want someone else to do it, it would be nice to know where
> this
> > > example is.
> > >
> > > On Thu, May 19, 2022 at 10:21 AM Robert Cyr <robert....@gmail.com>
> wrote:
> > >
> > >> I do not have the required  authorization to correct a wiki.  All
> that is
> > >> required is an extra line creating a numbered locale, and the sample
> > >> script
> > >> would simply become:
> > >>
> > >> make=: verb define
> > >> NB. make doubly-linked queue of (y) numbered locales
> > >> for_i. i.y do.
> > >>
> > >> cocreate ''
> > >>
> > >>   loc=. < ": i
> > >>   name__loc=: 'This is locale ' , ": i
> > >>   prev__loc=: < ": y| i-1
> > >>   next__loc=: < ": y| i+1
> > >> end.
> > >> empty''
> > >> )
> > >>
> > >> Numbered locales are different from named locales in that they must be
> > >> explicitly created before using.  This verb conew'' in the context of
> a
> > >> class script will create a numbered locale, and so will the verb
> > >> cocreate''.
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> Le ven. 6 mai 2022, à 22 h 43, Henry Rich <henryhr...@gmail.com> a
> écrit
> > >> :
> > >>
> > >> > I think you're right; please fix the Wiki.
> > >> >
> > >> > Henry Rich
> > >> >
> > >> > On 5/6/2022 8:34 PM, Robert Cyr wrote:
> > >> > > In
> > >> > > An example using explicit and object locatives
> > >> > >
> > >> > > The sampe script:
> > >> > >
> > >> > > make=: verb define
> > >> > > NB. make doubly-linked queue of (y) numbered locales
> > >> > > for_i. i.y do.
> > >> > >    loc=. < ": i
> > >> > >    name__loc=: 'This is locale ' , ": i
> > >> > >    prev__loc=: < ": y| i-1
> > >> > >    next__loc=: < ": y| i+1
> > >> > > end.
> > >> > > empty''
> > >> > > )
> > >> > >
> > >> > > generates a locale error.
> > >> > >
> > >> > > Numbered locales can only be used in the context of Class scripts
> and
> > >> > > are instances of the defined class. These numbered classes names
> are
> > >> > > created using
> > >> > >
> > >> > > conew 'ClassName'.
> > >> > >
> > >> > > The sample code should therefore be modified to use legal locale
> names
> > >> > like
> > >> > >
> > >> > > loc =. <'loc',":i
> > >> > >
> ----------------------------------------------------------------------
> > >> > > For information about J forums see
> > >> http://www.jsoftware.com/forums.htm
> > >> >
> > >> >
> > >> > --
> > >> > This email has been checked for viruses by AVG.
> > >> > https://www.avg.com
> > >> >
> > >> >
> ----------------------------------------------------------------------
> > >> > For information about J forums see
> http://www.jsoftware.com/forums.htm
> > >> >
> > >> ----------------------------------------------------------------------
> > >> For information about J forums see
> http://www.jsoftware.com/forums.htm
> > >>
> > >
> > >
> > > --
> > >
> > > Devon McCormick, CFA
> > >
> > > Quantitative Consultant
> > >
> > >
> >
> > --
> >
> > Devon McCormick, CFA
> >
> > Quantitative Consultant
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> 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