[eclipse-clp-users] Working with lists

From: Ismael München <ismaelmunchen_at_...197...>
Date: Sun, 15 Nov 2009 16:36:04 -0300
Hi...

a have this code:

go2(List_A, List_B, C) :-

 List_B :: 0..1,

 C #= List_A * List_B.

When I do:
?- go2([[1, 5], [1, 5]], [[0, 1], [0, 1]], C).
C = 10
Yes (0.00s cpu)

It's ok

When I do:
?- go2([[1, 5], [1, 5]], [[0, 1], [0, 1]], 10).
Yes (0.00s cpu)

It's ok

but, when i do
?- go2([[1, 5], [1, 5]], C, 10).
Abort
undefined arithmetic expression in _562 is [[1, 5], [1, 5]] in module eclipse

don't work.

Sameone help me?

Ismael
Received on Sun Nov 15 2009 - 18:56:00 CET

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST