Actually I guess just a plain 0 may also work but all these are
implementation features so that the J dictionary keeps silent on it. In
other words, all of them may fail in another platform or in a future
release of J.

Чтв, 14 Окт 2010, Martin Pelletier писал(а):
>   I took a peek at wdooo and noticed something. Whenever there is a need 
> for a 0 as an integer, the script uses 2-2.
> 
> Most will know why:
> 
> GetJType =: 3!:0
>     GetJType 0
> 1
>     GetJType 1
> 1
>     GetJType 2
> 4
>     GetJType 2-2
> 4
> 
> However, it surprises me that the choice would be 2-2, because first, 
> 0+0 and 0-0 do the same:
> 
>     GetJType 0-0
> 4
>     GetJType 0+0
> 4
> 
> And secondly (and most important), that this was not abstracted in a 
> constant, but instead repeated about 20 times (and without the entire 
> list of packages, just some most of the standard stuff, I can find over 
> 40 instances of 2-2).
> 
>     ZERO =: 0+0
> 
> Maybe this is me nitpicking, but it seems odd.
> 
> Martin Pelletier

-- 
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

Reply via email to