CUSIP: Difference between revisions
m
diag, +1
m (diag, +1) |
|||
Line 482:
cch = repeat(-1,256)
for i='0' to '9' do
cch[i
end for
for i='A' to 'Z' do
cch[i
end for
cch['*'
cch['@'
cch['#'
end if
if length(cusip)!=9 or find('\0',cusip) then return 0 end if
for i=1 to 8 do
c := cusip[i]
v := cch[c
if v=-1 then
if remainder(i,2)=0 then
v *= 2
|