Re: [eclipse-users] macro and term_expansion

From: Kish Shen <kish_at_crosscoreop.com>
Date: Mon, 03 Sep 2007 20:29:43 +0100
Hi,

klint09_at_libero.it wrote:
> Hi folks,
>
> in swi-prolog
> 1 ?- [user].
> |: term_expansion((a(a,A)),(b(b,A))).
> |:
> % user://1 compiled 0.00 sec, 296 bytes
>
> Yes
> 2 ?- [user].
> |: a(a,3).
> |: 
> % user://2 compiled 0.00 sec, 216 bytes
>
> Yes
> 3 ?- listing.
>
> b(b, 3).
>
> In Eclipse?
>
> (This is wrong:
>
> [eclipse 1]: [user].
> tra(a(a,A),b(b,A).
> :-local macro(a/2,tra/2,[term]).
>
> yes
> [eclipse 2]: [user].
> a(a,1).
>
> yes
> [eclipse 3]: b(b,1).
>
> no)
>
>
>   
I am not able to reproduce your problem. In both ECLiPSe 5.10 or 5.11, I 
get success with the query b(b,1). [after correcting a syntax error in 
your definition of tra/2]

How did you produce your execution from ECLiPSe? There is a syntax error 
in tra/2 (missing ')'); and various messages from ECLiPSe are missing, 
and the yes and no are not exactly what recent versions of ECLiPSe prints.

Here is what I get:
[eclipse 1]: [user].
tra(a(a,A),b(b,A)).
:- local macro(a/2,tra/2,[term]).
user compiled traceable 132 bytes in 0.00 seconds

Yes (0.00s cpu)
[eclipse 2]: [user].
a(a,1).
user compiled traceable 40 bytes in 0.00 seconds

Yes (0.00s cpu)
[eclipse 3]: b(b,1).

Yes (0.00s cpu)

====
Cheers,

Kish

> ------------------------------------------------------
> Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
> http://i-mode.wind.it/
>
>
> _______________________________________________
> ECLiPSe-Users mailing list
> ECLiPSe-Users_at_crosscoreop.com
> http://www.crosscoreop.com/mailman/options/eclipse-users
>   
Received on Mon Sep 03 2007 - 20:30:04 CEST

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