Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: arithmetic operator precedence
- X-seq: zsh-workers 25185
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: arithmetic operator precedence
- Date: Tue, 17 Jun 2008 14:05:01 +0200
- In-reply-to: <200806171146.m5HBkhfR013230@xxxxxxxxxxxxxx>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080612095723.GF5113@xxxxxxxxxxxxxxx> <20080616080726.GP10734@xxxxxxxxxxxxxxxxxxx> <20080616144211.276fb0e3@pws-pc> <2d460de70806170219k12ff4cadn441b52c48bf8076f@xxxxxxxxxxxxxx> <20080617094509.GC5016@xxxxxxxxxxxxxxx> <2d460de70806170324o5a44609x9383cc2445d67dd6@xxxxxxxxxxxxxx> <20080617103829.GD5016@xxxxxxxxxxxxxxx> <20080617114340.398c731f@news01> <20080617112815.GF10734@xxxxxxxxxxxxxxxxxxx> <200806171146.m5HBkhfR013230@xxxxxxxxxxxxxx>
On 2008-06-17 12:46:43 +0100, Peter Stephenson wrote:
> That would be quite sensible, but the problem is we already have two
> cases: traditional zsh behaviour, which we don't want to change now, and
> "some sort of" compatilibity mode. As it looks like "some sort of"
> compatibility might as well be with other shells (so the option could
> really be called "SH_PRECEDENCES", although it's perhaps less obvious that
> means "something approximating to the precedences you probably expect if
> you are a regular programmer") this doesn't give us room for manoeuvre
> without yet another option.
Yes, at least two options are needed. You have the precedences defined
by POSIX (e.g. & vs ==). But concerning the power operator **, this
isn't defined by POSIX, and even the other shells that implement it
may change its behavior and/or make the behavior controlled by an
option.
--
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