Hi Richard,

----- Original Message -----
From: "Richard Gaskin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 29, 2001 2:03 PM
Subject: Order of precedence conundrum


>
> When I put this in the Message Box:
>
>    put value( true AND false AND true OR NOT true AND NOT false )
>
> I get "false".
>

To get "true", shouldn't the first AND be an OR? Like this:

   put value( true OR false AND true OR NOT true AND NOT false )

I could simply misunderstand how this works, but it seems to me that
(true AND false) can only be evaluated as "false". If that's the case,
statement 3 would read:

> 3.    false          AND true OR false    AND true
>       -----------------------    -----------------

...which would make the difference.

I'm open to correction here - that's just how I see it.

Phil



> But based on the order of precedence (NOT, then AND, then OR), I
would think
> this would evaluate like this (broken down to show intermediate
steps as I
> understand them):
>
>
> 1.    true AND false AND true OR NOT true AND NOT false
>                                  --------     ---------
>
>
> 2.    true AND false AND true OR false    AND true
>       --------------
>
>
> 3.    true           AND true OR false    AND true
>       -----------------------    -----------------
>
>
> 4.    true                    OR true
>       -------------------------------
>
>
> 5.    true
>
>
> Where did I go wrong in my steps?  Or is this a bug in the MC
interpreter?
> I kinda doubt the latter on this one, yet I've been looking at it
too long
> to see where I goofed -- any clues?  Does the "left to right" rule
override
> precedence for Boolean operators?
>
> --
>  Richard Gaskin
>  Fourth World Media Corporation
>  Multimedia Design and Development for Mac, Windows, UNIX, and the
Web
>
_____________________________________________________________________
>  [EMAIL PROTECTED]
http://www.FourthWorld.com
>  Tel: 323-225-3717           ICQ#60248349            Fax:
323-225-0716
>
>
>
> Archives: http://www.mail-archive.com/[email protected]/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> Please send bug reports to <[EMAIL PROTECTED]>, not this list.
>
>


Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to