Path: csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail From: Andreas Schwab Newsgroups: gnu.bash.bug Subject: Re: Inconsistent arithmetic evaluation of parameters Date: Wed, 02 Sep 2015 09:16:19 +0200 Lines: 32 Approved: bug-bash@gnu.org Message-ID: References: <61895190-83A6-4D62-B90E-65023D5E966B@gmail.com> <20150901175030.GP4309@eeg.ccf.org> <20150901202308.GR4309@eeg.ccf.org> <87r3mhu91x.fsf@igel.home> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: usenet.stanford.edu 1441178189 16710 208.118.235.17 (2 Sep 2015 07:16:29 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Greg Wooledge , "bug-bash@gnu.org" To: Dennis Williamson Envelope-to: bug-bash@gnu.org X-Virus-Scanned: amavisd-new at mnet-online.de X-Auth-Info: xf34nBQZuWA2T7FlEbInSsHUgQfd984Z6aqYWX+J4En3ugG4IWroV+mZ9wTQhq6N X-Yow: DIDI... is that a MARTIAN name, or, are we in ISRAEL? In-Reply-To: (Dennis Williamson's message of "Tue, 1 Sep 2015 18:32:42 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 212.18.0.9 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11458 Dennis Williamson writes: > On Tue, Sep 1, 2015 at 4:24 PM, Andreas Schwab > wrote: > >> Dennis Williamson writes: >> >> > $ echo $((foo)) # expansion succeeds, indirection fails >> > dash: 4: Illegal number: bar >> >> The indirection didn't fail, it just didn't produce a number, so the >> expression is malformed. >> >> Andreas. >> >> -- >> Andreas Schwab, schwab@linux-m68k.org >> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 >> "And now for something completely different." >> > > I disagree. The _expansion_ produced "bar" That's not an expansion. Only $ introduces an expansion. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."