From: Atom Smasher <atom@smasher.org>
To: zsh-users@zsh.org
Subject: Re: $[ 09.5 ] -- bad math expression
Date: Mon, 3 Dec 2012 11:15:04 +1300 (NZDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1212031112080.27859@oreo.lan> (raw)
In-Reply-To: <121202135940.ZM19771@torch.brasslantern.com>
On Sun, 2 Dec 2012, Bart Schaefer wrote:
> On Dec 2, 11:30pm, Atom Smasher wrote:
> }
> } echo "$[ 09.5 ]"
> } zsh: bad math expression: operator expected at `.5 '
> }
> } the problem seems to come up when using a non-integer with a leading
> } zero.
>
> Hmm. This appears to have changed back in about 2007, workers/23165.
> Any number with a leading zero is interpreted as an integer, unless a
> decimal point immediately follows the zero, in which case it's treated
> as floating point.
===============
thanks! i'll give a try with the workaround, and look forward to the patch
being incorporated into new builds!
i guess i can also strip the leading zero(s) from any numbers where that
could be an issue...
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"We in the West must bear in mind that the poor countries
are poor primarily because we have exploited them through
political or economic colonialism."
-- Martin Luther King, Jr
prev parent reply other threads:[~2012-12-02 22:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-02 10:30 Atom Smasher
2012-12-02 21:05 ` Peter Stephenson
2012-12-02 21:59 ` Bart Schaefer
2012-12-02 22:15 ` Atom Smasher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.00.1212031112080.27859@oreo.lan \
--to=atom@smasher.org \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).