[eclipse-clp-users] instantiation fault

From: <behemot_at_...78...>
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:

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


NOCC, http://nocc.sourceforge.net

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

This archive was generated by hypermail 2.3.0 : Wed Jul 17 2019 - 21:14:48 CEST