Re: Dollar sign.
Antoniotti Marco <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On Jan 29, 2014, at 02:27 , Matthew Versaggi <[email protected]<mailto:[email protected]>> wrote: The "=" sign is the instantiation symbol which binds together (in the prolog sense) the (complex) term $(foo) with the variable X. That in a very real sense means that X has become equal to $(foo) in the prolog sense of equal which can be tested using the '==' predicate (if I remember correctly). $(foo) = X. X = $foo. Yes. I know about =, == and unification. The question is about the ‘$’ sign. I would have expected the above to yield ?- $(foo) = X. X = $(foo) It doesn’t. Also note that: ?- compound($(x, y)). true. ?- compound($(foo)). true. ?- compound($foo). true. So. What is going on with the ‘$’ sign/predicate? I am just being lazy and I admit it. Where is the use of ‘$’ as a predicate/operator explained in the manual (as I said, I am lazy and I gave up searching) :) :) Cheers — MA On Tue, Jan 28, 2014 at 6:44 PM, Antoniotti Marco <[email protected]<mailto:[email protected]>> wrote: Hi Apologies for the stupid question. I must be missing something with the dollar sign. I don’t quite understand what is going on in the following transcript. ?- $(foo) = X. X = $foo. ?- $(foo, bar) = X. X = $(foo, bar). ?- X = foo, $X. ERROR: toplevel: Undefined procedure: ($)/2 (DWIM could not correct goal) ?- X = foo, $(X). ERROR: toplevel: Undefined procedure: ($)/2 (DWIM could not correct goal) ?- X = foo, $(X, zot). ERROR: toplevel: Undefined procedure: ($)/2 (DWIM could not correct goal) ?- X = foo, $(zot, X). ERROR: toplevel: Undefined procedure: ($)/2 (DWIM could not correct goal) ?- $(foo, bar) = X. X = $(foo, bar). Does anybody have quick explanation about this? Thanks -- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first. -------------- next part -------------- HTML attachment scrubbed and removed _______________________________________________ SWI-Prolog mailing list [email protected] https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog -- ######################################################### Matthew R. Versaggi, President & CEO Versaggi Information Systems, Inc. Adjunct Professor of eBusiness DePaul University Email: mailto:[email protected], [email protected] M: 630-292-8422 LinkedIn: http://www.linkedin.com/in/versaggi ######################################################### -- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first. -------------- next part -------------- HTML attachment scrubbed and removed