[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Arithmetic evaluation of negative numbers with base prefix
From: |
Chet Ramey |
Subject: |
Re: Arithmetic evaluation of negative numbers with base prefix |
Date: |
Tue, 18 Jun 2019 10:27:48 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 |
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/
- Arithmetic evaluation of negative numbers with base prefix, Jeremy Townshend, 2019/06/14
- Re: Arithmetic evaluation of negative numbers with base prefix, Chet Ramey, 2019/06/14
- Re: Arithmetic evaluation of negative numbers with base prefix, Jeremy Townshend, 2019/06/17
- Re: Arithmetic evaluation of negative numbers with base prefix, Greg Wooledge, 2019/06/17
- Re: Arithmetic evaluation of negative numbers with base prefix, Ilkka Virta, 2019/06/18
- Re: Arithmetic evaluation of negative numbers with base prefix,
Chet Ramey <=
- Re: Arithmetic evaluation of negative numbers with base prefix, Greg Wooledge, 2019/06/18
- Re: Arithmetic evaluation of negative numbers with base prefix, Ilkka Virta, 2019/06/18
- Re: Arithmetic evaluation of negative numbers with base prefix, Chet Ramey, 2019/06/19
- Re: Arithmetic evaluation of negative numbers with base prefix, Chet Ramey, 2019/06/19
- Re: Arithmetic evaluation of negative numbers with base prefix, Chet Ramey, 2019/06/19
Re: Arithmetic evaluation of negative numbers with base prefix, Ilkka Virta, 2019/06/14