Hi, >I'm looking for someone would can explain me why this code does not compile. >:- lib(ech). ... >file try_CHR.pl, line 16: syntax error: postfix/infix operator expected >| label_with my_plus(P,N,R) if true. The label_with declaration that was in the old chr library is not supported by lib(ech). [See the section `The Extended CHR Implementation' in the CHR chapter of the Library Manual for a list of differences between lib(chr) and lib(ech).] The idea is that labelling can be done explicitly by the user. However, if you want to duplicate the effect of chr_labeling/0 of lib(chr), you can define it as follow: :- constraints chr_labeling/0. chr_labeling, my_plus(P,N,R) <=> (P=zero;N=zero), chr_labeling. Note that you need to declare chr_labeling, as it is also not defined in lib(ech). Hope this helps, KishReceived on Tue Jan 25 17:25:11 2005
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:33 PM GMT GMT