On Mon, Oct 21, 2019 at 07:12:32AM -0700, C K Kashyap wrote: > Finally - its good to see the values :) ... I used (show @@). > I see, so @@ is just a "variable" introduced in the select function - i got > a little confused by (@@) - I thought it was a function call - but looks > like select takes the argument unevaluated :) (love the (vi 'select) )
We cannot talk about "evaluation" in Pilog, as this is no Lisp despite it uses s-expressions. It is all about "unification", i.e. values are matched with patterns containing variables. And a variable is recognized by Pilog because it starts with "@". In real Prolog variables are recognized because they start with an uppercase letter. > I noticed that the variable name has to start with @ - It does not work if > I use a name without @ - why is that? Exactly. This is how Prolog works. Perhaps you may want to look at some intro like https://www.metalevel.at/prolog - Prolog is a beast very different from other languages. Also, I noticed that functions in the > form library have their parameter names in the string format (for example (de > form ("Attr" . "Prg")) - I am curious about that too. These are transient symbols used for privacy. See https://software-lab.de/doc/faq.html#problems ☺/ A!ex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe