Hmm,
:SETVAR X 1
:echo ![false and false or x=1]
FALSE
:echo ![false and false or !x=1]
TRUE
:echo ![(false and false) or x=1]
TRUE
:echo ![(false and false) or !x=1]
TRUE
:echo ![false and (false or x=1)]
FALSE
:echo ![false and (false or !x=1)]
FALSE
:calc false and false or x = 1
FALSE
:calc false and false or !x = 1
TRUE
:calc false or x = 1
TRUE
:calc false or !x = 1
TRUE
This doesn't look good for our hero...
I can't explain it. Perhaps Jeff V. can comment or log a call with the
RC.
"Schick, John" wrote:
>
> Can anyone explain the following behavior of the MPE/iX command interpreter?
>
> :SETVAR X 1
> :ECHO ![X = 3 AND X = 2 OR X = 1]
> FALSE
> :ECHO ![!X = 3 AND !X = 2 OR !X = 1]
> TRUE
> :
>
> Of course these expressions don't represent anything useful, but it seems to
> me that both expressions are essentially equivalent and both should evaluate
> to TRUE.
>
> It is behaving like the OR operation is taking precedence over the AND
> operation in the first expression.
>
> I have been able to replicate this behavior on both flavors of MPE that I
> have available - MPE/iX 5.5 PP6 and MPE/iX 6.5.
>
> John Schick
> McKessonHBOC