Re: [eclipse-users] How do I declare a set of real values for variables in Eclipse Prolog

From: Kish Shen <kisshen_at_...5...>
Date: Thu, 12 Jul 2007 15:25:09 +0100
Hi Tomas,

You can use lib(propia) with lib(ic):

[eclipse 1]: lib(ic).
...
[eclipse 2]: lib(propia).
...
[eclipse 3]: member(X,[1.0,2.0,3.5]) infers ic.

X = X{1.0 .. 3.5}

[eclipse 4]: member(X,[1.0,2.0,3.5]) infers ic, X = 2.0.

X = 2.0
Yes (0.00s cpu)
[eclipse 5]: member(X,[1.0,2.0,3.5]) infers ic, X = 2.1.

No (0.00s cpu)
[eclipse 6]: member(X,[1.0,2.0,3.5]) infers ic, X = 2.

No (0.00s cpu)
[eclipse 7]: member(X,[1.0,2.0,3.5]) infers ic, X = 3.5.

X = 3.5
Yes (0.00s cpu)
[eclipse 8]:

Cheers,

Kish

Tomas Eric Nordlander wrote:
> Hi,
>
> I am new to using Eclipse and wonder if anyone could give me some pointers
> or
> show how I can declare a set real values for a variables?
> Eg.
>
> [X1] :: 0.1,0.5,0.6,0.7
> [X2] :: 0.3,0.4,0.8,1
>
> Thanks in advance,
>
> Tomas
>  
>
> --------------------------------------------
> Dr. Tomas Eric Nordlander,
> Cork Constraint Computation Centre (4C)
> University College Cork,
> Cork, Ireland. 
>
> Tel:    +353-(0)21-4255405
> Fax:    +353-(0)21-4255424
> E-Mail: tnordlan " at " 4c.ucc.ie
> Web:    http://4c.ucc.ie
> -------------------------------------------- 
>
>
>
>
> _______________________________________________
> ECLiPSe-Users mailing list
> ECLiPSe-Users_at_...2...
> http://www.crosscoreop.com/mailman/options/eclipse-users
>   
Received on Thu Jul 12 2007 - 15:25:16 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST