Meta-called do loops and setarg

From: josh singer <josh.singer_at_parc-technologies.com>
Date: Thu 29 May 2003 01:04:37 PM GMT
Message-ID: <3E899FAFBF56D611B6A500508B9A9DA234277F@LON-SRV2>
Hi folks, 

Look at the following example, run on v 5.6 #28, Linux. With each iteration
of the do loop the first param of X gets set to a higher number. Fine. 

But if we meta-call the do loop, the setargs appear not to have any effect.
Seems like a bug. The bug has been there at least since 5.4. 

Wierdly, if you instantiate Y first, the bug goes away.

cheers, 

josh

----

ECLiPSe Constraint Logic Programming System [kernel]
Copyright Imperial College London and ICL
Certain libraries copyright Parc Technologies Ltd
GMP library copyright Free Software Foundation
Version 5.6 #28, Mon Apr 21 00:13 2003
[eclipse 1]:  X = p(0, Y), (count(I, 1, 4), param(X) do setarg(1, X, I)).

Y = Y
X = p(4, Y)
I = I
Yes (0.00s cpu)
[eclipse 2]:  X = p(0, Y), call((count(I, 1, 4), param(X) do setarg(1, X,
I))).

Y = Y
X = p(0, Y)
I = I
Yes (0.00s cpu)
[eclipse 3]: 

----

Josh Singer
Software Developer, Parc Technologies Limited
Tel. +44 (0)207 261 4067
josh.singer@parc-technologies.com
http://www.parc-technologies.com

This e-mail message is for the sole use of the intended recipient(s)
-its contents are the property of Parc Technologies Limited (or its
licensors) and are confidential. Please do not copy, review, use
(except for the intended purposes), disclose or distribute the e-mail
or its contents (or allow anyone else to do so) without our prior
permission. Parc Technologies Limited does not guarantee that this
e-mail has not been intercepted and amended nor that it is
virus-free. You should carry out your own virus checks before opening
any attachment.  Any opinions expressed in this e-mail message are
those of the author and not necessarily Parc Technologies Limited.
Received on Thu May 29 14:01:47 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:22 PM GMT GMT