LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 13 Oct 2011 14:03:57 -0500
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
MIME-Version:
1.0
Message-ID:
In-Reply-To:
Content-Type:
text/plain; charset=ISO-8859-1
From:
Kevin Godby <[log in to unmask]>
Parts/Attachments:
text/plain (23 lines)
On Thu, Oct 13, 2011 at 1:23 PM, Bruno Le Floch <[log in to unmask]> wrote:
> (1) Precedence:
> - Currently "a&&b||c" means "a&&(b||c)" and "a||b&&c" means "a||(b&&c)".
> - Other programming languages decide that either && or || has higher
> precedence. Is there an accepted consensus on which one should bound
> tighter?
>
> Should && have higher or lower priority than || ? Is there an accepted standard?
> Currently, in "a XX b YY c ZZ d", the right-most operator, "ZZ" has
> highest priority, then "YY", then "XX". In python it seems to be that
> "and" has higher precedence than "or".

In all the cases I've encountered, the order of precedence is defined
as NOT, AND, OR.  Wikipedia seems to agree (for what it's worth):
<http://en.wikipedia.org/wiki/Logical_connective#Order_of_precedence>.

I'd like to see this order of precedence within LaTeX 3 as well.
Otherwise, I'm afraid I'll encounter little logic errors that are
difficult for me to track down (since I'm so accustomed to the
standard rules of precedence holding true).

--Kevin

ATOM RSS1 RSS2