Roger wrote:
>  We are talking about the rules for numeric vector constants

It would be helpful if these rules were spelled out.  The rules for an
individual numeric constant are spelled out explicitly at 
http://www.jsoftware.com/help/dictionary/dcons.htm  .  However, the
interpretation of those rules changes depending on the larger vector in
which the individual constant is embedded.  

This can be amusing [1], or confusing, as in this thread.  It doesn't
bother me personally, per se; my interest in seeing the rules spelled out
is so I can create a J model of J's numeric constant interpreter (part of
my ongoing project to reimplement J in J).  

Right now, I could write the interpreter according to Constants, such that:

           numeric '1x1 1p1 16bcdef'
        (1 * ^1), (1 * o.1), (16 #. '0123456789abcdefghijklmnopqrstuvwxyz' i.
'cdef')

but since the interpretation changes with context in an unspecified manner,
the emulation wouldn't be faithful, which thwarts my purpose.

-Dan

[1]  http://www.jsoftware.com/pipermail/programming/2006-July/002615.html


PS:  There is a bit more information available on J's numeric constants,
for those who're interested:

       http://www.jsoftware.com/jwiki/Guides/Constants

     and some observations I wrote up a while back:
   
       http://www.jsoftware.com/pipermail/general/2006-June/027263.html

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to