|
Revision 4601, 1.0 KB
(checked in by pmoura, 7 weeks ago)
|
|
Added svn:mime-type property to source files (set to text/x-logtalk).
|
-
Property svn:mime-type set to
text/x-logtalk
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | :- object(misspell). |
|---|
| 3 | |
|---|
| 4 | % call to an undefined but declared predicate |
|---|
| 5 | :- public(foo/0). |
|---|
| 6 | |
|---|
| 7 | output :- |
|---|
| 8 | foo. |
|---|
| 9 | |
|---|
| 10 | % call to an undefined local predicate |
|---|
| 11 | output(A) :- |
|---|
| 12 | bar(A). |
|---|
| 13 | |
|---|
| 14 | % misspelt call to Prolog built-in predicate |
|---|
| 15 | output(A) :- |
|---|
| 16 | writr(A). |
|---|
| 17 | |
|---|
| 18 | :- end_object. |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | % singleton variables in opening object directive |
|---|
| 23 | :- object(singletons(L)). |
|---|
| 24 | |
|---|
| 25 | % singleton variables in predicate clause |
|---|
| 26 | predicate(A) :- |
|---|
| 27 | write(C). |
|---|
| 28 | |
|---|
| 29 | :- end_object. |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | :- object(plredef). |
|---|
| 34 | |
|---|
| 35 | % redefinition of a Prolog built-in predicate |
|---|
| 36 | write(_). |
|---|
| 37 | |
|---|
| 38 | :- end_object. |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | :- object(lgtredef). |
|---|
| 43 | |
|---|
| 44 | % redefinition of Logtalk built-in predicate |
|---|
| 45 | current_object(_). |
|---|
| 46 | |
|---|
| 47 | :- end_object. |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | % references to unknown entities in object opening directive |
|---|
| 52 | |
|---|
| 53 | :- object(unknownrefs, |
|---|
| 54 | implements(protocol), |
|---|
| 55 | imports(category), |
|---|
| 56 | extends(object)). |
|---|
| 57 | |
|---|
| 58 | |
|---|
| 59 | :- end_object. |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | |
|---|
| 63 | :- object(portability). |
|---|
| 64 | |
|---|
| 65 | :- public(predicate/0). |
|---|
| 66 | |
|---|
| 67 | % clause with calls to non-ISO Prolog standard predicates |
|---|
| 68 | predicate :- |
|---|
| 69 | compare(Result, first, second), |
|---|
| 70 | retractall(result(Result, _)), |
|---|
| 71 | sort([], []), |
|---|
| 72 | consult(file). |
|---|
| 73 | |
|---|
| 74 | :- end_object. |
|---|