load 'c:\task.ijs'
p=: 'jtask'conew~ 'c:\arion\arion.exe'
write__p 'e2e4',LF
1
wait__p 1
0
read__p ''
0
write__p 10$'test ',LF
1
wait__p 3
0
$read__p ''
0
write__p 'bye',LF
1
close__p''
0
wait__p 3
$read__p ''
+---------------------------+
| Arion 1.7 chess program |
.....JCC> more lines displayed when starting the program
- launch Arion with 'dv x' argument to modify the draw value 'x'
ex: 'arion.exe dv -10'
......JCC > it calculates a good move to reply to 'e2e4'
Arion> 1 -23 0 1 g8h6
1 -10 0 2 g8f6
.......
- time : 5.016s
- speed : 569Kn/s
- ht : 52%
move e7e5
.......JCC > loop because the 'test' subcommand is bad
Arion> - unknown command, missing parameter or illegal move
- Please, type 'help' or ' /?'just after the command name for more
informations
..........
Arion> - unknown command, missing parameter or illegal move
- Please, type 'help' or ' /?'just after the command name for more
informations
Arion> - unknown command, missing par
destroy__p''
......JCC > the program continues to read until I cancel it manually (
windows task manager)
- Please, type 'help' or ' /?'just after the command name for more
informations
Arion> - unknown command, missing parameter or illegal move
............
Arion> - unknown command, missing parameter or illegal move
- Please, type 'help' or ' /?'just after the command name for more
informations
Arion> - unknown command,
----- Original Message -----
From: "Oleg Kobchenko" <[EMAIL PROTECTED]>
To: "Programming forum" <[email protected]>
Sent: Tuesday, April 03, 2007 10:01 PM
Subject: Re: [Jprogramming] stdin/stdout
Can we be sure that the chess program does not
use stderr for some operations instead of stdout?
I don't think and I am pretty sure
> At any rate, what if, even without the response
there, try to send other commands like "quit",
will it act on it?
Yes, the command to quit the program is 'bye' and at that time I can get all
the output from the beginning. It seems that the read or readpeek does not
read at all...
I believe that the goal is not very far...at least I hope so.
JCC
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm