n 進数

Shiro さんのところの「Scheme:数遊び」経由で、nobsun さんところの「Cahier:2004-12-04」より。なるほど a. は n 進表記への変換というだけならば簡単だ…、というわけで何もせずに答えだけ確認してみました。

target chars size table
"準備" target _ 99999999999999999. chars _ '!"#$%&''()*+,-./:;<=>?@[\]^_`{|}~0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz'. size _ chars size. table _ Dictionary new. 1 to: size do: [: index | table at: (index - 1 radix: size) last asciiValue + 1 put: (chars at: index)]. "94 進数にして変換" ^ (('000000000000000', ((target radix: size) allButFirst: 3)) translateWith: table) last: 16 "=> !!!!!!!;6'uVO%_e "

ほう。 いや。ただ、それだけなんですけどね(^_^;)。

つづく…。