help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] declare -i


From: Chet Ramey
Subject: Re: [Help-bash] declare -i
Date: Wed, 09 May 2012 17:16:29 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

On 5/9/12 4:43 PM, Bill Gradwohl wrote:

> Now I have to try to explain this to myself as to why it works. Here goes.
> 
> Everything is considered in an arithmetic context because of the -i.
> Variables inside an arithmetic context don't need the $ or ${}, so that's
> why it works. ???
> 
> If that's the case, then putting 'xyz' into an arithmetic context should
> have produced a 0 but it didn't. Therefore my analysis must be wrong.

Not necessarily.  There's the possibility that you've found a bug, or a
limitation imposed by another attribute.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]