Re: "find": AND/OR no longer equal precedence



Mister.Fred.Ma wrote:

There was a time when I used HP-UX and Solaris, and the "find"
command's AND (implied) and OR operators were of equal precedence.
Basically, operators were evaluated from left to right. I am
currently using GNU "find" version 4.3.8, and the AND operator has
greater precedence than the OR operator. When did this unequal
precedence start to become standard (assuming that it is standard) It
certainly is more intuitive, though we have to be careful of falling
back on old ways, and maybe need to rework old scripts? Is it pretty
well the way that *nix is going?

The precedence has been standard in POSIX since 1992 (when the first
POSIX.2 standard was published), and before that in XPG3 (1988).
It was almost certainly the same in XPG2, but I don't have a copy
to hand. (The XPG3 change history says nothing about any change
relating to precedence.)

I would be very surprised if there has ever been a version of find
where the precedence was different.

--
Geoff Clare <netnews@xxxxxxxxxxxxx>
.



Relevant Pages

  • Re: Sequence points
    ... consecutive sequence points with respect to ordinary operations tracks ... follow operator precedence. ... determined, even before the standard, was inadequate based on my prior ... They are engaged in mail fraud, ...
    (comp.programming)
  • Re: man 3 switch
    ... of arithmetic operators of equal precedence in the same statement (in ... not the standard, but does the standard say otherwise? ... The languages themselves normally aren't. ...
    (Fedora)
  • Re: man 3 switch
    ... the switch statement in gcc may not be exactly the same as the switch ... As C is an ISO standard, I sincerely doubt there would be any ... of arithmetic operators of equal precedence in the same statement (in ... C allows quite a bit of leeway to the compiler implementation. ...
    (Fedora)
  • Re: man 3 switch
    ... the switch statement in gcc may not be exactly the same as the switch ... As C is an ISO standard, I sincerely doubt there would be any ... of arithmetic operators of equal precedence in the same statement (in ... increment the value of a, ...
    (Fedora)
  • Re: C/C++ Ambiguity in Order of Evaluation
    ... The order of evaluation of subexpressions is determined by the ... precedence and grouping of the operators. ... A reference manual that implements a language standard should be as ... settled in other manner that do not cause confusion. ...
    (comp.lang.c)