|
Revision 4662, 1.2 KB
(checked in by pmoura, 5 days ago)
|
|
Updated copyright notice.
|
-
Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 | ================================================================ |
|---|
| 2 | Logtalk - Open source object-oriented logic programming language |
|---|
| 3 | Release 2.35.0 |
|---|
| 4 | |
|---|
| 5 | Copyright (c) 1998-2009 Paulo Moura. All Rights Reserved. |
|---|
| 6 | Logtalk is free software. You can redistribute it and/or modify |
|---|
| 7 | it under the terms of the "Artistic License 2.0" as published by |
|---|
| 8 | The Perl Foundation. Consult the "LICENSE.txt" file for details. |
|---|
| 9 | ================================================================ |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | To load this example and for sample queries, please see the SCRIPT.txt file. |
|---|
| 13 | |
|---|
| 14 | This folder contains an example of using a category to define a simple |
|---|
| 15 | logging support for objects. This example illustrates how to define in |
|---|
| 16 | a category a set of predicates that handle a dynamic predicate in the |
|---|
| 17 | context of "this". Although the database built-in methods, such as |
|---|
| 18 | assertz/1 or retractall/1, are straightforward to use, calling the |
|---|
| 19 | dynamic predicate must be performed using the message sending ::/2 |
|---|
| 20 | control construct (note that a direct call to the dynamic predicate |
|---|
| 21 | would result in a compilation error as it would be interpreted as a |
|---|
| 22 | call to a local category predicate: categories cannot contain clauses |
|---|
| 23 | for dynamic predicates). |
|---|