Re: [eclipse-clp-users] Problem of Collections.EMPTY_LIST.

From: Joachim Schimpf <joachim.schimpf_at_...269...>
Date: Thu, 10 Jun 2010 19:40:53 +1000
} P wrote:
> hello, everyone!
> I am meeting some problem when I am using ECLiPSe to solving problem.
> The problem is I can't distinguish any arg of CompoundTerm is that a
> list or a empty list?
> I tried many ways to comparing, but I am failed at all.
> Which way I should used correctly?
> I wrote this line(of course, I run compile and query in eclipse.rpc first),
> "
> if((((CompoundTerm)(CompoundTerm)result.arg(i)).arg(j)==(Collections.EMPTY_LIST)))
> ",
> and it's always return true.
> Why???
> Can you give me some hint???

I am not sure, but I would expect that you have to convert the
CompoundTerm to a Collection before doing the comparison.

-- Joachim
Received on Thu Jun 10 2010 - 10:39:01 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST