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


Groups > gnu.bash.bug > #15055 > unrolled thread

Re: Arithmetic evaluation of negative numbers with base prefix

Started byChet Ramey <chet.ramey@case.edu>
First post2019-06-18 10:27 -0400
Last post2019-06-18 10:27 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#15055 — Re: Arithmetic evaluation of negative numbers with base prefix

FromChet Ramey <chet.ramey@case.edu>
Date2019-06-18 10:27 -0400
SubjectRe: Arithmetic evaluation of negative numbers with base prefix
Message-ID<mailman.349.1560868097.10840.bug-bash@gnu.org>
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/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web