Forwarded: Prolog, windows and buffered output? 
Author Message
 Forwarded: Prolog, windows and buffered output?

On Fri, 13 Sep 2002 01:57:39 +0000

Quote:

> Yes, I finally managed to make it work. I exec Poplog from another
> program, redirecting standard input and output.

Sorry for the long delay.
If I remember correctly, this unshaved code worked. It still didn't
accomplish what I was trying to do, but I don't remember what I was
trying to do anyway :-(

define lee() -> charstring;
  lvars charstring = '';
  lvars stdin = popdevin; ;;;poprawdevin;
  lvars car = ' ';
  repeat forever
     ;;;'entering loop, now I'll read'  =>
     if sysread(stdin, car, 1) = 1 then
         if car(1) = 10 then
         ;;;if car(1) = 13 then
            quitloop;
         else    
            charstring >< car -> charstring;
            if length(charstring) > 15 then
              quitloop;
            endif;
         endif
     endif;
  endrepeat;
enddefine;

vars temp;
vars stdout = poprawdevout;

lee() -> temp;
pr(temp);

************

The main problem I found was that poprawdevin (and *out) didn't worked,
so I had to read in text mode. Moreover, it seemed that "=>" and "pr"
didn't output through the same channel.

The program that I use is a delphi translation of this C program:

  http://www.*-*-*.com/ ;EN-US;q190351&

I'm afraid that this message isn't very helpful, but I'm taking this
code again to make it work.

--
salu2,

  Nico



Sat, 19 Mar 2005 03:06:31 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Forwarded: Prolog, windows and buffered output?

2. Prolog, windows and buffered output?

3. Buffered output on Windows

4. Question: Windows keyboard input/output buffer handler

5. rxvt + python problem: script output buffered and interactive output missing

6. Buffers on Windows Me (buffers=40)

7. Forward Chaining with Prolog?

8. Forward-Chaining in Prolog?

9. Forward chaining in Prolog?

10. forward chainer for Prolog rules

11. Forward chaining in Prolog

12. New Forward Chaining Support in Prolog

 

 
Powered by phpBB® Forum Software