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/expansion/expansion.lgt
pmoura 9fe4d26c59 Logtalk 2.27.0 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1539 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2006-02-10 17:44:05 +00:00

66 lines
995 B
Plaintext

:- category(number_conversion,
implements(term_expansionp)).
term_expansion(0, zero).
term_expansion(1, one).
term_expansion(2, two).
term_expansion(3, three).
term_expansion(4, four).
term_expansion(5, five).
term_expansion(6, six).
term_expansion(7, seven).
term_expansion(8, eight).
term_expansion(9, nine).
:- end_category.
:- category(conversion_test).
:- public(test/2).
test(Term, Expansion) :-
expand_term(Term, Expansion).
:- end_category.
:- object(exp_public,
imports(public::number_conversion)).
:- end_object.
:- object(desc_public,
imports(conversion_test),
extends(exp_public)).
:- end_object.
:- object(exp_protected,
imports(protected::number_conversion)).
:- end_object.
:- object(desc_protected,
imports(conversion_test),
extends(exp_protected)).
:- end_object.
:- object(exp_private,
imports(private::number_conversion)).
:- end_object.
:- object(desc_private,
imports(conversion_test),
extends(exp_private)).
:- end_object.