看板 Programming 關於我們 聯絡資訊
Hi, I've answered you using Google Groups. But it seems that cannot be accepted by normal BBS systems because of difference between UTF-8 and Big5 encoding. So I have to reply again in English. On 5=A4=EB24=A4=E9, =A4W=A4=C810=AE=C944=A4=C0, ntouckcm....@ptt.cc (=AA=BE= =A8=AC=B1`=BC=D6) wrote: > process(Input, G, P, G, P,_):- > Input \=3D positive(_), > Input \=3D negative(_), > write("Enter either positive(Instance) or negative(Instance) "), = nl > > % The following predicate definitions are duplicated in either > % the general to specific searches or the specific to genearal searches. > % > specialize_set([], [], _, _). > ERROR: c:/candidate1.pl:54:0: Syntax error: Operator expected The same error showed in GNU Prolog is more clear, "candidate1.pl:54:1: syntax error: . or operator expected after expression," which means that there's an operator missing. Watch out the tail of the formula before specialize_set/4, there it expects a dot symbol. And, ... > specialize_set([Hypothesis|Rest],[Hypothesis|Updated_rest],Instance, Type= s):- > not (covers(Hypothesis, Instance)), > specialize_set(Rest,Updated_rest, Instance, Types). Have you ever got any error at this segment? In GNU Prolog, it got the same error message at the line 63, position 12, which is just at the space between *not* and *(covers(Hypothesis, Instance)),*. And it will be clean out if the space is eliminated.
ntouckcm:謝謝~140.121.219.142 05/26 21:23