Talk:SEDOLs

From Rosetta Code

J

Does the J solution reject strings with vowels in them? It says on the wikipedia that vowels are never used in the 6-character code, so the function should reject strings that have them. --Mwn3d 04:58, 5 August 2008 (UTC)

The J code isn't a validator, it merely calculates and appends the check digit.
You could modify it to whine about vowels by removing them:
    sn   =.  '0123456789 BCD FGH JKLMN PQRST VWXYZ'  
Not terribly exciting.
68.175.31.239 12:44, 5 August 2008 (UTC) (aka DanBron)

'0' checksum

Among the test strings ought to be one that requires a '0' to verify that the checksum is in the range 0..9 instead of 1..10. --IanOsgood 00:34, 7 August 2008 (UTC)

TCL and _

Hi, I generally like the use of '_' in the TCL solution, but on checking, I find that it fails to reject the use of '_' in a SEDOL: <lang tcl>(bin) 11 % set code B0YBKT B0YBKT (bin) 12 % set sedol "${code}[sedol::checksum $code]" B0YBKT7 (bin) 13 % set code B0YBAT B0YBAT (bin) 14 % set sedol "${code}[sedol::checksum $code]" invalid character: A (bin) 15 % set code B0YB_T B0YB_T (bin) 16 % set sedol "${code}[sedol::checksum $code]" B0YB_T7 (bin) 17 % </lang> --Paddy3118 05:01, 28 April 2009 (UTC)