On Fri, Aug 1, 2008 at 6:39 PM, Dan Bron <[EMAIL PROTECTED]> wrote:
>        sn   =.  '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'              NB.  
> SEDOL numerals
>        acs  =.  (,. 10 | 10 - 10 | 1 3 1 7 3 9 +/@:*"1 ])&.(sn&i.)  NB.  
> Append checksum
> Though the repeated appearance of  10  makes me suspect there's a cuter (more 
> concise) way to express this.

   (10&|@- -: 10 | 10 - 10 | ]) i: 100
1

Presumably they used the more round about expression to avoid
problems with languages that have confused implementations of
modulo of negative numbers.

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

Reply via email to