HP3000-L Archives

May 2000, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Erik Vistica <[log in to unmask]>
Reply To:
Erik Vistica <[log in to unmask]>
Date:
Fri, 26 May 2000 13:25:00 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (58 lines)
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

ATOM RSS1 RSS2