";
$sums[] = $result;
}
print '';
if (isset ($decimal))
{
print "Convert the decimal component (0.$decimal)
of the number:";
// Pad the number with a leading 0 so that we can
// start at position 1
$decimal = '0'.$decimal;
$length = strlen ($decimal);
for ($pos = 1; $pos $pos =
$result
";
$sums[] = $result;
}
print '';
}
$sums = implode (' + ', $sums);
eval ("\$base_10_value = $sums;");
print "The value of the base $base number
$number in base 10 is $base_10_value.
";
print "This number is derived from the sum of the values
of the previous operations ($sums).