Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15055

Re: Arithmetic evaluation of negative numbers with base prefix

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Arithmetic evaluation of negative numbers with base prefix
Date 2019-06-18 10:27 -0400
Message-ID <mailman.349.1560868097.10840.bug-bash@gnu.org> (permalink)
References (1 earlier) <dc253e63-de07-6c60-7b20-1688286a43d2@case.edu> <20190617133026.GC27242@tower> <20190617154708.GG2072@eeg.ccf.org> <bc6739d9-03f2-44b2-5bb5-22599e41cb5b@iki.fi> <edd48697-d959-808f-f9d5-873fc9a647f2@case.edu>

Show all headers | View raw


On 6/18/19 1:52 AM, Ilkka Virta wrote:

> I still wish this could be fixed to do the useful thing without any
> workarounds, given it's what ksh and zsh do

I'm surprised people keep saying this.

$ ksh93 -c 'echo ${.sh.version}'
Version ABIJM 93v- 2014-09-29
$ ksh93 -c 'echo $(( 10# ))'
ksh93:  10# : arithmetic syntax error
$ ksh93 -c 'echo $(( 10#-4 ))'
ksh93:  10#-4 : arithmetic syntax error


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Arithmetic evaluation of negative numbers with base prefix Chet Ramey <chet.ramey@case.edu> - 2019-06-18 10:27 -0400

csiph-web