%PRECEDENCE   Operator Precedence in MATLAB
%
%   MATLAB has the following precedence for the built-in operators when
%   evaluating expressions (from highest to lowest, with operators in
%   the same class having equal precedence):
%
%      1. transpose (.'), power (.^), complex conjugate transpose ('),
%         matrix power (^)
%
%      2. unary plus (+), unary minus (-), logical negation (~)
%
%      3. multiplication (.*), right division (./), left division (.\),
%         matrix multiplication (*), matrix right division (/),
%         matrix left division (\)
%
%      4. addition (+), subtraction (-)
%
%      5. colon operator (:)
%
%      6. less than (<), less than or equal to (<=), greater than (>),
%         greater than or equal to (>=), equal to (==),
%         not equal to (~=)
%
%      7. logical AND (&), logical OR (|) 
%
%   Operators with the same precedence associate left to right, for
%   example, "a - b + c" is equivalent to "(a - b) + c".
%
%   Note that "&" and "|" currently have the same precedence in MATLAB,
%   unlike almost all other programming languages.  A common situation
%   is an expression of the form:
%   
%                              w & x  |  y & z
%   
%   In MATLAB, this is equivalent to "((w & x) | y) & z", but in most
%   languages, it is equivalent to "(w & x) | (y & z)".
%   
%   In its most general form, the issue is with expressions of the form
%   "a | b & c".  In the above example, a is "w & x", b is "y", and c is
%   "z".  The implicit MATLAB parenthesization is "(a | b) & c", while
%   the usual one is "a | (b & c)".  The two parenthesizations give
%   different answers when "a" is true and "c" is false:
%   
%   
%                         (1 | b) & 0 => 1 & 0 => 0
%   
%                         1 | (b & 0) => 1 | 0 => 1
%   
%   Some customers have objected to MATLAB's non-standard treatment of
%   the interpretation of expressions of the form "a | b & c".  The
%   problem is that many MATLAB programmers are familiar with other
%   programming languages, and unconsciously write code assuming the
%   usual convention, or are unaware of MATLAB's logical operator
%   precedence.  We are concerned that, because of the non-standard
%   precedence of "|" and "&", some of our customers have code with
%   latent bugs.  On the other hand, we understand that some customers
%   may have code whose correctness depends upon the current precedence.
%   To address these concerns, MATLAB R11 issues a warning whenever it
%   sees a construct of the form "a | b & c", but continues to interpret
%   it as MATLAB always has.  Our in-house experience is that fewer than
%   0.1% of our (more than 10,000) M files generated the warning.  The
%   only way to suppress this warning is to introduce parentheses to
%   disambiguate the construct.  We strongly suggest that you carefully
%   examine each such instance and disambiguate it, because, based on
%   both customers' and our own experience, there is a high probability
%   that the instance needs parentheses around the "b & c".
%
%   For a tool that will scan a list of directories and find all
%   instances in M-files that can generate the warning,
%   type help CHECK_PRECEDENCE.
%
%   For a tool that will scan a list of directories and find all
%   instances in model files that can generate the warning,
%   type help CHECK_MDL_PRECEDENCE.
%
%   We are considering lowering the precedence of "|" below that of "&",
%   i.e., changing the interpretation of "a | b & c" to conform to
%   standard programming language conventions, and to achieve
%   consistency in all our products.  (Simulink and Stateflow both use
%   the standard precedence rather than the MATLAB precedence.)  Note
%   that if the MATLAB parser issues no warning for a file, or
%   equivalently, if CHECK_PRECEDENCE issues no warning, then the file
%   will be insensitive to any change in precedence.
%
%   See also CHECK_PRECEDENCE, CHECK_MDL_PRECEDENCE.

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   Revision: 1.1 $  $Date: 1998/11/15 01:30:48 $
