Anonymous user
Base58Check encoding: Difference between revisions
m
→version 3: changed whitespace in comment.
m (→version 3: simplified code, changed comments and whitespace.) |
m (→version 3: changed whitespace in comment.) |
||
Line 1,235:
exit 0 /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
B58: parse arg z 1 oz,,$;
if \datatype(z, 'W') | arg()>1 then do; hex= 1; z= c2d(z);
if left(z, 1)==1 then L1= verify(z ., 1) - 1 /*count number of leading ones (1's)*/
do until z==0; $= substr(@, z//58 +1, 1)$; z= z % 58
|