From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: negative bases in arithmetic expressions
Date: Wed, 8 Aug 2018 16:37:06 +0100 [thread overview]
Message-ID: <20180808153706.GB16265@chaz.gmail.com> (raw)
$ zsh -c 'echo $((-8#10))'
zsh:1: invalid base (must be 2 to 36 inclusive): -8
$ zsh -c 'echo $((- 8#10))'
-8
I'd rather zsh interpreted $((-8#10)) the same as $((- 8#10))
like other shells do as it's a bit pointless to consider the
sign as being part of the base and then reject anything negative
afterwise.
--
Stephane
next reply other threads:[~2018-08-08 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180808153741epcas3p346a9ba58cddb7bd5d5e91aaf3a63d51c@epcas3p3.samsung.com>
2018-08-08 15:37 ` Stephane Chazelas [this message]
2018-08-08 16:05 ` Peter Stephenson
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=20180808153706.GB16265@chaz.gmail.com \
--to=stephane.chazelas@gmail.com \
--cc=zsh-workers@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).