Next Program Repair Shop 64

GetPadString

     124        if ($Integer < 10) {
     125                return "0000".$Integer;
     126        } elsif (($Integer >= 10) and ($Integer < 100)) {
     127                return "000".$Integer;
        ...
        return sprintf "%05d", $Integer;
        my $n_zeroes = 5 - length($Integer);
        my $zeroes = '0' x $n_zeroes;
        return $zeroes . $Integer;

continued...


Next Copyright © 2002 M. J. Dominus