Logtalk 2.17.2 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1076 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -1,15 +1,41 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.17.1
|
||||
Release 2.17.2
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
To load all objects in this example consult the mi.loader utility
|
||||
file (note that the *.loader files are Prolog files).
|
||||
|
||||
To load all entities in this example compile and load the loader file:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
|
||||
There are two examples in this folder. The first one is an adoption of a
|
||||
multi-inheritance C++ example found on the D. M. Capper book "Introducing
|
||||
C++ for Scientists, Engineers and Mathematicians" published by
|
||||
Springer-Verlag. It uses dynamic predicates for storing state. The second
|
||||
example is a variant of the first using parametric objects.
|
||||
example is a variant of the first one using parametric objects.
|
||||
|
||||
This example defines the following objects:
|
||||
|
||||
space
|
||||
this object space stores spatial coordinates using a dynamic
|
||||
predicate
|
||||
|
||||
time
|
||||
this object stores a time stamp using a dynamic predicate
|
||||
|
||||
space_time
|
||||
this object inherits from both the objects space and time
|
||||
|
||||
|
||||
space(_,_,_)
|
||||
similar to object space but using parameters instead of dynamic
|
||||
predicates
|
||||
|
||||
time(_)
|
||||
similar to object space but using a parameter instead of a dynamic
|
||||
predicate
|
||||
|
||||
space_time(_,_,_,_)
|
||||
this object inherits from both the objects space(_,_,_) and time(_)
|
||||
|
@@ -1,11 +1,17 @@
|
||||
=================================================================
|
||||
Logtalk - Object oriented extension to Prolog
|
||||
Release 2.17.1
|
||||
Release 2.17.2
|
||||
|
||||
Copyright (c) 1998-2004 Paulo Moura. All Rights Reserved.
|
||||
=================================================================
|
||||
|
||||
|
||||
% start by loading the example:
|
||||
|
||||
| ?- logtalk_load(loader).
|
||||
...
|
||||
|
||||
|
||||
% set a point in the space-time:
|
||||
|
||||
| ?- space_time::rotate(1, 2, 3).
|
||||
|
10
Logtalk/examples/mi/loader.lgt
Normal file
10
Logtalk/examples/mi/loader.lgt
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
:- initialization(
|
||||
logtalk_load([
|
||||
space,
|
||||
time,
|
||||
space_time,
|
||||
|
||||
space3,
|
||||
time1,
|
||||
space_time4])).
|
Reference in New Issue
Block a user