Tomas Uribe wrote: > Hello. A quick question about eclipse: > > I am defining a macro with: > > :- functor(packet with [],N,A), > export portray(N/A,format_packet_out/2,[term]). Since release 5.6 you can write this as :- export portray(property(functor) of packet, format_packet_out/2,[]). > > However, this macro does not seem to be invoked, e.g., when I use > print_list to print a list that contains it. The bug is that print_list/1 is not module-aware (it calls writeln/1 inside the lists module, where your macro is not visible...). The easiest is not to use print_list, you can simply use a loop: (foreach(X,List) do writeln(X)) which will do the right thing. -- Joachim Schimpf / phone: +44 20 7594 8187 IC-Parc / mailto:J.Schimpf@imperial.ac.uk Imperial College London / http://www.icparc.ic.ac.uk/eclipseReceived on Wed Feb 18 11:07:09 2004
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:24 PM GMT GMT