cc4531cd1e
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@53 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
27 lines
336 B
Plaintext
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.
|