Re: OT: Need help with numeric bases
From: | vaksje <vaksje@...> |
Date: | Tuesday, February 25, 2003, 11:11 |
H. S. Teoh wrote, 2003.02.24 20:14'jä:
>[snip]
>
>#!/usr/bin/perl
>foreach $digit ( split //, $ARGV[0] ) {
> $acc = $acc*8 + $digit;
>}
>print "$acc\n";
I've attempted writing a PHP version, viewable at
http://starfish.mine.nu:8080/~vaxje/number.php. It does decimal to base
conversion based on your perl code, but I can't figure out how to do the
reverse unfortunately (quoted above).
*feels guilty for posting off-topic*
vaksje.
http://starfish.mine.nu:8080/~vaxje/
(unfortunately does not yet contain conlang stuff ;)