in reply to acme::tools num2code function
It took me a while to understand what num2code does, so let me try to explain a bit better:
If you call num2code($number, $output_length, $chars), it converts $number to base length($chars) using the characters in $chars as symbol of the output alphabet. Then the result is padded to $output_length characters.
So if you call it as num2code($number, 10, 'AB'), it will produce a string of 10 characters consisiting of A's and B's, where A means 0 and B means 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: acme::tools num2code function
by cztmonk (Monk) on Jun 11, 2012 at 09:12 UTC | |
by zentara (Cardinal) on Jun 11, 2012 at 10:29 UTC | |
by cztmonk (Monk) on Jun 11, 2012 at 10:34 UTC |