Hi Eric,
> stuck on some basic things. For example, how would you translate this Prolog
> term:
>
> intro :-
>
> write("somme text ...").
We need to call Lisp here
: (be prin (@X)
(^ @ (prin (-> @X))) )
-> prin
: (? (prin "Hello world\n"))
Hello world
-> T
: (be i
Hello Alex,
Thank you very much, that's it.
In fact, I have tried this solution before asking on the list, however
as I am still not very fluent in Lisp I have written :
: (be intro
(prin "Hello world\n") )
without the two >> () << at the beginning of the defintion of the
predicate!!
Not a big deal but... it seems there is one too many ')' on the end
resulting in bad input rather than "fact"
: (in "@doc/fun.l" (from "(de ") (till " " T)))
-> "fact"
On Wed, Nov 23, 2016 at 09:52:32AM +, dean wrote:
> resulting in bad input rather than "fact"
> : (in "@doc/fun.l" (from "(de ") (till " " T)))
Thanks Dean! Fixed in next release.
♪♫ Alex
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Is there a way to have something similar to 'read' in Pilog?
Thanks,
Eric
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Hi Alex
You're very welcome,
On 23 November 2016 at 10:53, Alexander Burger wrote:
> On Wed, Nov 23, 2016 at 09:52:32AM +, dean wrote:
> > resulting in bad input rather than "fact"
> > : (in "@doc/fun.l" (from "(de ") (till " " T)))
>
> Thanks Dean! Fixed in next release.
>
> ♪♫ Alex
> --
>
Hi Eric,
> Is there a way to have something similar to 'read' in Pilog?
Here too some Lisp function must be called.
However, it depends what you mean with "read": You can call the 'read'
function which reads s-expressions in Lisp syntax (or lists of tokens
when called with an additional argument
Alex, thanks for being so patient! I came up with this:
(be p_read ()
(^ @ (read)) )
which looks to work so far ;-).
However I wonder if there is a way to catch and unify the read value to
a variable.
For example in Prolog the predicate 'read/1' allows to catch in
'read(Value)' where 'Val
On Wed, Nov 23, 2016 at 07:19:05PM +0100, CILz wrote:
> Alex, thanks for being so patient! I came up with this:
>
> (be p_read ()
> (^ @ (read)) )
>
> which looks to work so far ;-).
>
> However I wonder if there is a way to catch and unify the read value to a
> variable.
: (be read (@X)
I'm just wondering what my options are re doing this
(de mmbr (Trgt L)
(for Ele L
(if (== Ele Trgt) (println "found so exit with true")
(println "try next")
)
)
(prinl "list exhausted so return false")
)
(mmbr 'B '(A B C))
I only know how to itera
Alex, you rock! Thanks very much. Eric
Le 23/11/2016 à 20:23, Alexander Burger a écrit :
: (be read (@X)
(^ @X (read)) )
-> read
: (? (read @A))
(foo bar)
@A=(foo bar)
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Hi Dean,
> I'm just wondering what my options are re doing this
>
> (de mmbr (Trgt L)
>(for Ele L
> (if (== Ele Trgt) (println "found so exit with true")
> (println "try next")
> )
>)
>(prinl "list exhausted so return false")
> )
>
> (mmbr 'B '
Alex
Thank you very much for this.
Best Regards
Dean
On 23 November 2016 at 21:00, Alexander Burger wrote:
> Hi Dean,
>
> > I'm just wondering what my options are re doing this
> >
> > (de mmbr (Trgt L)
> >(for Ele L
> > (if (== Ele Trgt) (println "found so exit with true")
> >
13 matches
Mail list logo