|
From: Vitor S. C. <vi...@bi...> - 2002-03-11 16:57:06
|
Hi,
>
> Thanks, it does answers some of the Questions I had,
> I tried it already, and I do not understand how to send to the created Pipe.
> I tried it with write/2 but I have no Idea how to handle the IO-Stream,
> I tried so far ...
> :- exec('java Frame',[pipe(Stream),pipe(Answer),null],_).
> :- write(Stream, "message").
I see what you mean, t's probably easier to do something like:
:- exec('java Frame',[pipe(Stream),pipe(Answer),null],_),
yap_flag(user_input, Stream),
yap_flag(user_input, Output).
That redirects Yap's user_input and user_output to these streams, then
you can just use read/1 and write/1.
Cheers,
Vitor
|