s:' -1' returns a rank-1 array even for singleton.
try
({.s:' -1') 2 5}a

Пн, 23 янв 2017, Tom Arneson написал(а):
> JVERSION
> 
> Engine: j805/j64/windows
> 
> Release: commercial/2016-12-11T08:02:16
> 
> Library: 8.05.11
> 
> Qt IDE: 1.5.3s/5.6.2
> 
> Platform: Win 64
> 
> Installer: J805 install
> 
> InstallPath: c:/program files/j64-805
> 
> Contact: www.jsoftware.com
> 
>  
> 
>  
> 
> [a=. 10#s:' 1'
> 
> `1 `1 `1 `1 `1 `1 `1 `1 `1 `1
> 
> (s:' -1') 2 5}a
> 
> |length error
> 
> | (s:' -1') 2 5}a
> 
>  
> 
> [a=. 10# s:' 1'
> 
> `1 `1 `1 `1 `1 `1 `1 `1 `1 `1
> 
> [b=. s:' tom'
> 
> `tom
> 
> [a=. (b) 5}a
> 
> |rank error
> 
> | [a=:(b) 5}a
> 
>  
> 
> [a=. (b) 1 5}a
> 
> |length error
> 
> | [a=:(b) 1 5}a
> 
>  
> 
> NB. try similar using numeric data works as expected
> 
> [a=. 10#1
> 
> 1 1 1 1 1 1 1 1 1 1
> 
> (3) 1 3 4}a
> 
> 1 3 1 3 3 1 1 1 1 1
> 
> [a=.(3) 1 3 4}a
> 
> 1 3 1 3 3 1 1 1 1 1
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to