It is unusual to make assignment an array with an internal datatype.  But
it was all driven by the needs of the parser (see Dictionary, Section
II.E), and the J interpreter is built around the parser.

See file t.c, and search for ASGN, CASGN, and CGASGN.  (The latter two in
the value parts, instead of the 0 and 1 that I said.)


On Sat, Mar 9, 2019 at 4:10 PM Henry Rich <henryhr...@gmail.com> wrote:

> I never knew that.  I was relying on the ID byte.
>
> I now use upper flag bits of the type to distinguish ASGN as
> private/public, and to-name/to-noun.
>
> I needed to distinguish named private assignments in explicit
> definitions, because I preallocate symbols for them in a symbol table
> that I also preallocate, and point each reference to them to the
> preallocated symbol to avoid the name search during execution.
>
> Henry Rich
>
> On 3/9/2019 6:59 PM, Roger Hui wrote:
> > ASGN is an internal type; in the value part (the ravel) of a scalar with
> > that type, there is a 0 or 1, indicating whether is local assignment (=.)
> > or global assignment (=:).
> >
> > On Sat, Mar 9, 2019 at 2:52 PM Henry Rich <henryhr...@gmail.com> wrote:
> >
> >> Aaaghh, you caught me.  That was one of the first changes I made when I
> >> was learning the J Engine.  I knew it would print wrong, but I didn't
> >> know how to make it right, and I hoped no one would ever notice.
> >>
> >> I guess I have to go back and fix it, but I understand the system better
> >> now, so maybe I can figure out how to do it properly.
> >>
> >> Henry Rich
> >>
> >> On 3/9/2019 2:05 PM, Joey K Tuttle wrote:
> >>> jkt@set1:~$ /usr/local/lib/j64-801/bin/jconsole
> >>>      JVERSION
> >>> Engine: j701/2011-01-10/11:25
> >>> Library: 8.01.028
> >>> Platform: Linux 64
> >>> Installer: j801 install
> >>> InstallPath: /usr/local/lib/j64-801
> >>>      +a=.'huh'
> >>> |domain error
> >>> |       +a=.'huh'
> >>>
> >>>      exit 0
> >>>
> >>> jkt@set1:~$ ja
> >>>      JVERSION
> >>> Engine: j807/j64nonavx/linux
> >>> Release-c: commercial/2019-02-24T10:44:44
> >>> Library: 8.07.22
> >>> Platform: Linux 64
> >>> Installer: J807 install
> >>> InstallPath: /usr/local/lib/j64-807
> >>> Contact: www.jsoftware.com
> >>>      +a=.'huh'
> >>> |domain error
> >>> |       +a=:'huh'
> >>>
> >>>      NB. Curious -- why is =. changed to =: for error reports in recent
> >> versions?
> >>> ----------------------------------------------------------------------
> >>> 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
>
> ----------------------------------------------------------------------
> 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