Sujet : Re: The "leading zero means octal" thing...
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.lang.tcl comp.unix.shell comp.editorsDate : 05. Jan 2025, 22:55:10
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vlev3u$2k7dc$1@news.xmission.com>
References : 1 2
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
vletuv$17djb$1@dont-email.me>, saito <
saitology9@gmail.com> wrote:
...
I can't help but think that this may be related to your post regarding
time calculation. I had left this quote in my reply:
>
There is an interesting "octal" problem left as an exercise
>
This was exactly the exercise as well. "clock format" leaves leading
zeros in the result depending on what time it was. It is missing "string
trimleft" calls which I'd discovered after some test runs before posting.
It is, in fact, related to that other thread. In fact, I had developed an
entirely different solution to that problem (very short, in fact) which had
been running fine for a few weeks until it happened to hit the dreaded "08"
and crashed. I fixed that basically by adding code using "regsub" to
remove any leading zero before doing the calculations.
I'll have to take a look at "string trimleft".
-- Which of these is the crazier bit of right wing lunacy?1) We've just had another mass shooting; now is not the time to be talking about gun control.2) We've just had a massive hurricane; now is not the time to be talking about climate change.