in reply to (tye)Re: Converting Seconds to Nice Format
in thread Converting Seconds to Nice Format
Anyway, in my continuing crusade as champion for the lovely % I would like to point out that
could be "better" written as$left= int( $left / $_ ); $unit -= $left * $_;
Toss in a$left= int( $left / $_ ); $unit %= $_;
(in the subroutine BLOCK) and you can drop the call to int() as well - but be careful with this since this makes calls to % platform dependent (usually only an issue with negative numbers, not a problem here).use integer;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re2: Converting Seconds to Nice Format
by tye (Sage) on Nov 13, 2000 at 22:11 UTC | |
by snax (Hermit) on Nov 14, 2000 at 13:20 UTC | |
by tye (Sage) on Nov 14, 2000 at 20:22 UTC |