Thank you Alex, I get the following when I run the (?) - for which I defined a function XX. I do see that I get back 1 record when *CuSuNm is "Oaks" and 3 records when *CuSuNm is "". However, I don't see the actual values - except for @Nm. While at it, could you also explain the @/@@ convention? Is there a doc I could read for this?
: (setq *CuSuNm "Oaks") -> "Oaks" : (XX) @Nr=NIL @Nm="Oaks" @Tel=NIL @Plz=NIL @Ort=NIL @Mob=NIL @@={C2} -> NIL : (setq *CuSuNm "") -> NIL : (XX) @Nr=NIL @Nm=NIL @Tel=NIL @Plz=NIL @Ort=NIL @Mob=NIL @@={C1} @Nr=NIL @Nm=NIL @Tel=NIL @Plz=NIL @Ort=NIL @Mob=NIL @@={C2} @Nr=NIL @Nm=NIL @Tel=NIL @Plz=NIL @Ort=NIL @Mob=NIL @@={C3} -> NIL : Regards, Kashyap On Mon, Oct 21, 2019 at 4:09 AM Alexander Burger <a...@software-lab.de> wrote: > Hi Kashyap, > > > While I see the big pieces based on the description given in > doc/app.html, > > I need some help understanding the Pilog queries. > > > > I think I can make progress if I could figure out how to run the pilog > > queries in the sample app on the REPL. For example, how can I run the > pilog > > query in the choOrd function in app/gui.l. > > The easiest is to use the '?' function to test Pilog queries interactively. > > For example, after setting some globals, eg. > > : (setq *CuSuNm "Oaks") > > you can paste the whole query > > : (? > @Nr (and *CuSuNr (cons @ T)) > @Nm *CuSuNm > @Tel *CuSuTel > @Plz *CuSuPlz > @Ort *CuSuOrt > @Mob *CuSuMob > (select (@@) > ((nr +CuSu @Nr) (nm +CuSu @Nm) (tel +CuSu @Tel) > (plz +CuSu @Plz) (ort +CuSu @Ort) (mob +CuSu @Mob) ) > (range @Nr @@ nr) > (tolr @Nm @@ nm) > (fold @Tel @@ tel) > (head @Plz @@ plz) > (part @Ort @@ ort) > (fold @Mob @@ mob) ) ) > > and then step through the results with <enter>. > > ☺/ A!ex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >