On 2009/07/03, at 12:57, Tobias Kuhn wrote:
> I have a question concerning operators in SWI Prolog: I know that
> one can redefine the predefined operators, but can one also
> "undefine" them?
>
> Concretely, I would like to use the name "<" as a common predicate
> name "<(A,B)" that is not pretty-printed as "A<B".
>
> Using write_canonical/1 or using write_term/2 with the ignore_ops
> option does not really help because then also lists are written
> verbosely which is not what I want.
>
> Any ideas?
?- current_op(P, T, <).
P = 700,
T = xfx ;
false.
?- op(0, xfx, <).
true.
?- write(<(a, b)).
<(a, b)
true.
Cheers,
Paulo
-----------------------------------------------------------------
Paulo Jorge Lopes de Moura, PhD
Assistant Professor
Dep. of Computer Science, University of Beira Interior
6201-001 Covilhã, Portugal
Office 3.18 Ext. 3276
Phone: +351 275319891 Fax: +351 275319899
Email: <mailto:
pmoura@...>
Home page: <
http://www.di.ubi.pt/~pmoura>
Research: <
http://logtalk.org/> Blog: <
http://blog.logtalk.org/>
-----------------------------------------------------------------
_______________________________________________
SWI-Prolog mailing list
SWI-Prolog@...
https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog