Changeset 4431 for trunk/manuals/migration
- Timestamp:
- 08/17/08 10:41:43 (5 months ago)
- Files:
-
- 1 modified
-
trunk/manuals/migration/index.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/manuals/migration/index.html
r4412 r4431 226 226 As a general rule, the Prolog modules should be loaded (e.g. in the auxiliary Logtalk loader files) before compiling objects that make use of module predicates. This is mandatory whenever the module exports operator declarations that you want to use in your objects and categories (as in the example above). 227 227 </p> 228 <p> 229 Logtalk supports the declaration of predicate aliases in <code>use_module/2</code> directives used within object and categories. For example, the ECLiPSe IC Constraint Solvers defines a <code>::/2</code> variable domain operator that clashes with the Logtalk <code>::/2</code> message sending operator. We can solve the conflict by writing: 230 </p> 231 <pre>:- use_module(ic, [alldifferent/1, (::)/2:ins/2, (#=)/2]).</pre> 232 <p> 233 With this directive, calls to the <code>ins/2</code> predicate alias will be automatically compiled by Logtalk to calls to the <code>::/2</code> predicate in the <code>ic</code> module. 234 </p> 228 235 229 236 <div class="footer"> 230 237 <div class="copyright"> 231 238 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 232 <span>Last updated on: July 31, 2008</span>239 <span>Last updated on: August 16, 2008</span> 233 240 </div> 234 241 <div class="navbottom">
