Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: foo=${(z)${(s:.:)SECONDS}} ; echo ${foo[1]}.${(r:2:)foo[2]}
- X-seq: zsh-users 12118
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: foo=${(z)${(s:.:)SECONDS}} ; echo ${foo[1]}.${(r:2:)foo[2]}
- Date: Fri, 26 Oct 2007 11:25:45 +1300 (NZDT)
- In-reply-to: <200710250929.l9P9TU3b015621@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
- References: <20071025033706.12434.qmail@xxxxxxxxxxx> <20071025100559.6bd494cf@news01> <200710250929.l9P9TU3b015621@xxxxxxxxxxxxxx>
On Thu, 25 Oct 2007, Peter Stephenson wrote:
Aargh. OK. The *precision*, in the sense that the floating point
number comes out with so many digits, is indeed 10. However, the
*accuracy* is 6 digits. That's because when it's floating point SECONDS
uses a microsecond timer. That's what I should be saying in the manual.
====================
hehe... yeah, after reading that i did a quick review of the difference
between "accuracy" and "precision", and came away from it no less
confused.
typeset -F 2 SECONDS
is still the, er, right answer to the question you asked.
=====================
holy crap!! that's slick!! (the deeper i dig with zsh the more i hear
myself saying that.)
thanks also to Angel Olivera for getting me to the right section of the
man-page for back references, which i was completely overlooking before.
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"We don't know if lobsters feel pain... [but] since
pain is a perception, we often don't know whether
people feel it either"
-- Prof. Edward Kravitz,
Harvard Medical School
Messages sorted by:
Reverse Date,
Date,
Thread,
Author