Re: read in Pilog - SOLVED
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
Re: read in Pilog
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) (^ @X (read)) ) -> read : (? (read @A)) (foo bar) @A=(foo bar) ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: read in Pilog
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 'Value' can be passed to an other predicate. Can I do the same here. Thanks, Eric Le 23/11/2016 à 13:15, Alexander Burger a écrit : Here too some Lisp function must be called. -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: read in Pilog
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 arguments), or the lower-level 'char', 'line', 'till' etc. functions. Or even 'rd' for binary or PLIO reading. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe