[eclipse-clp-users] instantiation fault

From: <behemot_at_alpha.pl>
Date: Wed Oct 08 10:38:37 2008
Dear users!

When I run the following instructions:
(foreach(X,[1,2,3]), foreach(Y,[4,5,6]), fromto(0,In,Out,Exp) do Out is X*Y+In).
I get the right result i.e. 1*4+2*5+3*6=32.

I try to do the same, but using variables instead of constants in the second list.
(foreach(X,[1,2,3]), foreach(Y,[D1,D2,D3]), fromto(0,In,Out,Exp) do Out is X*Y+In).
Then I've got the instantiation fault. I want to get the result as follows:
1*D1+2*D2+3*D3.

Is there any possibility to do this in such a way ?

Greetings,
W.

___________________________________
NOCC, http://nocc.sourceforge.net







--
    ---------    PROMOCJA!    --------
          Serwer i domena gratis!
     3GB powierzchni, 10 kont e-mail
           http://www.forpsi.pl
--------------------------------------------
Received on Wed Oct 08 2008 - 10:38:37 CEST

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET