This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/examples/mi/space.lgt

29 lines
463 B
Plaintext
Raw Normal View History

:- object(space).
:- public(xyz/3).
:- mode(xyz(?integer, ?integer, ?integer), zero_or_one).
:- private(xyz_/3).
:- mode(xyz_(?integer, ?integer, ?integer), zero_or_one).
:- dynamic(xyz_/3).
:- public(rotate/3).
:- mode(rotate(+integer, +integer, +integer), zero_or_one).
xyz(X, Y, Z) :-
::xyz_(X, Y, Z).
rotate(X, Y, Z) :-
integer(X),
integer(Y),
integer(Z),
::retractall(xyz_(_, _, _)),
::assertz(xyz_(X, Y, Z)).
:- end_object.