[Oz] Help ... (orelse) (fwd)

P Ravi Prakash ravi at konark.ncst.ernet.in
Thu Dec 16 12:36:51 CET 1999


Hi,

I am resending the following message, since it didn't seem to reach the
list.  My appologies if you recieve it multiple times.

- Ravi

---------- Forwarded message ----------
Date: Mon, 13 Dec 1999 20:31:33 -0500 (GMT)
From: P Ravi Prakash <ravi at konark.ncst.ernet.in>
To: users at mozart-oz.org
Subject: Help ... (orelse)

Hi,

I am getting unexpected results with the operator orelse. I expect the
following code to print [false false false] instead it prints 
[false false true]!  And if I directly give 24 instead of Ti.date, it
gives the expected output. Can some one kindly point out where I
am going wrong?

I am using Oz3.  It gives similar behaviour on Linux and Solaris.

Regards,

Ravi

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
functor
  import 
    System
    Application

define

TrT = 3
Ti = tup(date:24)

{System.show [  ((1 >= Ti.date) andthen
		 (1 =< (Ti.date + 1 + TrT)))

		((Ti.date >= 1) andthen
		 (Ti.date =< (2 + TrT)))

		(((1 >= Ti.date) andthen
		 (1 =< (Ti.date + 1 + TrT)))
		orelse
		 ((Ti.date >= 1) andthen
		 (Ti.date =< (2 + TrT))))
	      ]}
{Application.exit 0}
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  +-------------------------------------------------------------------------+
  |P Ravi Prakash,  KBCS Division         : Email: ravi at konark.ncst.ernet.in|
  |National Centre for Software Technology: Phone: 620 1606 x 41, 12 =======|
  |Gulmohar Cross Road 9, Juhu            : Fax: 022-621 0139 ==============|
  |Mumbai - 400 049, INDIA                : ================================|
  | 			Web: http://konark.ncst.ernet.in/~ravi/             |
  +-------------------------------------------------------------------------+


-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list