next up previous index
Next: Porting Programs to Up: Using the compatibility Previous: Compiler versus Interpreter

Name clashes with global ECLiPSe builtins

Suppose you want to define a predicate named date/1, which conflicts with the ECLiPSe builtin called date/1. In this case the compiler will produce one of the following messages

warning: redefining a system predicate in date / 1
*** trying to redefine a procedure with another type: date / 1
depending on whether the definition or a call to the predicate was encountered first by the compiler. Both can be avoided by declaring the predicate as local. This declaration must be given before the first call to the predicate:
:- local date/1.
p(Y) :- date(Y).
date(1999).
Note that the date/1 builtin is now hidden by your own definition, but only in the module where you have redefined itgif. In all other modules, the builtin is still visible.

The same holds for the redefinition of protected predicates, see also section gif and appendix gif.



Micha Meier
Mon Mar 4 12:11:45 MET 1996