Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: arithmetic operator precedence



On 2008-06-19 18:10:56 +0200, Mikael Magnusson wrote:
> I've followed this discussion, and I'm left wondering only one thing.
> If it's decided that $(( -1 ** 2 )) == 1, then what's the point? Why
> would anyone ever write that?

Because this is something valid in most software, and it is too easy
to make a mistake. It would be much better to return an error in that
case.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



Messages sorted by: Reverse Date, Date, Thread, Author