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/time.lgt
2001-06-06 19:40:57 +00:00

27 lines
336 B
Plaintext

:- object(time).
:- public(t/1).
:- mode(t(?integer), zero_or_one).
:- private(t_/1).
:- mode(t_(?integer), zero_or_one).
:- dynamic(t_/1).
:- public(translate/1).
:- mode(translate(+integer), zero_or_one).
t(T) :-
::t_(T).
translate(T) :-
integer(T),
::retractall(t_(_)),
::assertz(t_(T)).
:- end_object.